aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2019-08-16 04:29:55 -0400
committerGitHub <noreply@github.com>2019-08-16 04:29:55 -0400
commitff3f3d30c741eb8d73d6a39421cbfc7451ec97ee (patch)
treeb56deac81122992e97766b6824f6d9e0891fb45b /components/script/dom
parentc585f4fff5696b4c048be2c763e27671028e83dc (diff)
parent72b273a746c887c06b0943c5a51d37edc370ce54 (diff)
downloadservo-ff3f3d30c741eb8d73d6a39421cbfc7451ec97ee.tar.gz
servo-ff3f3d30c741eb8d73d6a39421cbfc7451ec97ee.zip
Auto merge of #23966 - mmatyas:webgl_backtrace_buildfix, r=jdm
Fix build error when using the 'webgl_backtrace' feature This patch fixes a build error that happens when building with `--features webgl_backtrace`. However, while working on this I've noticed that calling `Backtrace::new()` instantly causes a segmentation fault. This didn't happen with the example code of [the package](https://crates.io/crates/backtrace) though, so I wasn't sure where to report this (maybe related: [backtrace-rs/#150](https://github.com/rust-lang/backtrace-rs/issues/150), [backtrace-rs/#189](https://github.com/rust-lang/backtrace-rs/issues/189)). cc @alexcrichton @jdm --- - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [ ] These changes fix #___ (GitHub issue number if applicable) <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because ___ - [x] These changes fix an issue that happens with a compile time feature not tested by the CI <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23966) <!-- Reviewable:end -->
Diffstat (limited to 'components/script/dom')
-rw-r--r--components/script/dom/webglrenderingcontext.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/components/script/dom/webglrenderingcontext.rs b/components/script/dom/webglrenderingcontext.rs
index 529b9285f2d..c4c580cda32 100644
--- a/components/script/dom/webglrenderingcontext.rs
+++ b/components/script/dom/webglrenderingcontext.rs
@@ -1118,10 +1118,10 @@ pub fn capture_webgl_backtrace<T: DomObject>(_: &T) -> WebGLCommandBacktrace {
pub fn capture_webgl_backtrace<T: DomObject>(obj: &T) -> WebGLCommandBacktrace {
let bt = Backtrace::new();
unsafe {
- capture_stack!(in(obj.global().get_cx()) let stack);
+ capture_stack!(in(*obj.global().get_cx()) let stack);
WebGLCommandBacktrace {
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)),
}
}
}