Bug 990353 - Flip off source discarding for XPCShell. r=fabrice
☠☠ backed out by 7e51adede3b6 ☠ ☠
authorBobby Holley <bobbyholley@gmail.com>
Fri, 18 Apr 2014 23:46:27 -0700
changeset 198914 6e1f9b821ae0a7b66e1a222ab85c2e4130012ccb
parent 198913 2926ad6c594fd1ef27907b8d79823dfbbd46fe3f
child 198915 f6b3c03454a4354ad2f2a214f36c8eafdda45e2e
push id486
push userasasaki@mozilla.com
push dateMon, 14 Jul 2014 18:39:42 +0000
treeherdermozilla-release@d33428174ff1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfabrice
bugs990353
milestone31.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 990353 - Flip off source discarding for XPCShell. r=fabrice
js/xpconnect/src/XPCShellImpl.cpp
--- a/js/xpconnect/src/XPCShellImpl.cpp
+++ b/js/xpconnect/src/XPCShellImpl.cpp
@@ -1545,16 +1545,21 @@ XRE_XPCShellMain(int argc, char **argv, 
             return 1;
 
         {
             JS::Rooted<JSObject*> glob(cx, holder->GetJSObject());
             if (!glob) {
                 return 1;
             }
 
+            // Even if we're building in a configuration where source is
+            // discarded, there's no reason to do that on XPCShell, and doing so
+            // might break various automation scripts.
+            JS::CompartmentOptionsRef(glob).setDiscardSource(false);
+
             backstagePass->SetGlobalObject(glob);
 
             JSAutoCompartment ac(cx, glob);
 
             if (!JS_InitReflect(cx, glob)) {
                 JS_EndRequest(cx);
                 return 1;
             }