Bug 1415086 - Fixing a out-of-scope issue for a string in Worklet code, r=qdot
☠☠ backed out by 67f24343cff8 ☠ ☠
authorAndrea Marchesini <amarchesini@mozilla.com>
Tue, 07 Nov 2017 20:16:02 +0100
changeset 443854 1c6eac3c74d516b2e76ebee8b07a663341133fda
parent 443853 b80f6e02f7571660442822b2c8800a6031a609f7
child 443855 82a3eab8a078e2d7d17817c47ae3c417928554e5
push id1618
push userCallek@gmail.com
push dateThu, 11 Jan 2018 17:45:48 +0000
treeherdermozilla-release@882ca853e05a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersqdot
bugs1415086
milestone58.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1415086 - Fixing a out-of-scope issue for a string in Worklet code, r=qdot
dom/worklet/Worklet.cpp
--- a/dom/worklet/Worklet.cpp
+++ b/dom/worklet/Worklet.cpp
@@ -196,19 +196,21 @@ public:
 
     AutoEntryScript aes(globalScope, "Worklet");
     JSContext* cx = aes.cx();
 
     JS::Rooted<JSObject*> globalObj(cx, globalScope->GetGlobalJSObject());
 
     (void) new XPCWrappedNativeScope(cx, globalObj);
 
+    NS_ConvertUTF16toUTF8(mURL) url;
+
     JS::CompileOptions compileOptions(cx);
     compileOptions.setIntroductionType("Worklet");
-    compileOptions.setFileAndLine(NS_ConvertUTF16toUTF8(mURL).get(), 0);
+    compileOptions.setFileAndLine(url, 0);
     compileOptions.setVersion(JSVERSION_DEFAULT);
     compileOptions.setIsRunOnce(true);
     compileOptions.setNoScriptRval(true);
 
     JSAutoCompartment comp(cx, globalObj);
 
     JS::Rooted<JS::Value> unused(cx);
     if (!JS::Evaluate(cx, compileOptions, buffer, &unused)) {