Fix build error when using the 'webgl_backtrace' feature

This commit is contained in:
Mátyás Mustoha 2019-08-14 11:30:55 +02:00
parent b6cdf93198
commit 72b273a746

View file

@ -1118,10 +1118,10 @@ pub fn capture_webgl_backtrace<T: DomObject>(_: &T) -> WebGLCommandBacktrace {
pub fn capture_webgl_backtrace<T: DomObject>(obj: &T) -> WebGLCommandBacktrace { pub fn capture_webgl_backtrace<T: DomObject>(obj: &T) -> WebGLCommandBacktrace {
let bt = Backtrace::new(); let bt = Backtrace::new();
unsafe { unsafe {
capture_stack!(in(obj.global().get_cx()) let stack); capture_stack!(in(*obj.global().get_cx()) let stack);
WebGLCommandBacktrace { WebGLCommandBacktrace {
backtrace: format!("{:?}", bt), backtrace: format!("{:?}", bt),
js_backtrace: stack.and_then(|s| s.as_string(None)), js_backtrace: stack.and_then(|s| s.as_string(None, js::jsapi::StackFormat::Default)),
} }
} }
} }