Bug 1595890 part 1. Remove isContentXBLScope from SandboxOptions. r=bholley
authorBoris Zbarsky <bzbarsky@mit.edu>
Thu, 14 Nov 2019 05:17:28 +0000
changeset 501883 cd89e23dd64d2c4e3bd846bdf5437167163abc7d
parent 501882 97b72aea347c896e1429de4ca15624a12833a46b
child 501884 abee66548e14e53e74efc32050bfea474edce916
push id114172
push userdluca@mozilla.com
push dateTue, 19 Nov 2019 11:31:10 +0000
treeherdermozilla-inbound@b5c5ba07d3db [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbholley
bugs1595890
milestone72.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 1595890 part 1. Remove isContentXBLScope from SandboxOptions. r=bholley It's always false. Differential Revision: https://phabricator.services.mozilla.com/D52742
js/xpconnect/src/Sandbox.cpp
js/xpconnect/src/xpcprivate.h
--- a/js/xpconnect/src/Sandbox.cpp
+++ b/js/xpconnect/src/Sandbox.cpp
@@ -1168,26 +1168,25 @@ nsresult xpc::CreateSandboxObject(JSCont
   if (creationOptions.compartmentSpecifier() ==
       JS::CompartmentSpecifier::ExistingCompartment) {
     // Make sure the compartment we're reusing has flags that match what we
     // would set on a new compartment.
     CompartmentPrivate* priv = CompartmentPrivate::Get(sandbox);
     MOZ_RELEASE_ASSERT(priv->allowWaivers == options.allowWaivers);
     MOZ_RELEASE_ASSERT(priv->isWebExtensionContentScript ==
                        options.isWebExtensionContentScript);
-    MOZ_RELEASE_ASSERT(priv->isContentXBLCompartment ==
-                       options.isContentXBLScope);
+    MOZ_RELEASE_ASSERT(priv->isContentXBLCompartment == false);
     MOZ_RELEASE_ASSERT(priv->isUAWidgetCompartment == options.isUAWidgetScope);
     MOZ_RELEASE_ASSERT(priv->hasExclusiveExpandos == hasExclusiveExpandos);
     MOZ_RELEASE_ASSERT(priv->wantXrays == wantXrays);
   } else {
     CompartmentPrivate* priv = CompartmentPrivate::Get(sandbox);
     priv->allowWaivers = options.allowWaivers;
     priv->isWebExtensionContentScript = options.isWebExtensionContentScript;
-    priv->isContentXBLCompartment = options.isContentXBLScope;
+    priv->isContentXBLCompartment = false;
     priv->isUAWidgetCompartment = options.isUAWidgetScope;
     priv->hasExclusiveExpandos = hasExclusiveExpandos;
     priv->wantXrays = wantXrays;
   }
 
   {
     JSAutoRealm ar(cx, sandbox);
 
--- a/js/xpconnect/src/xpcprivate.h
+++ b/js/xpconnect/src/xpcprivate.h
@@ -2347,17 +2347,16 @@ class MOZ_STACK_CLASS SandboxOptions : p
         allowWaivers(true),
         wantComponents(true),
         wantExportHelpers(false),
         isWebExtensionContentScript(false),
         proto(cx),
         sameZoneAs(cx),
         freshCompartment(false),
         freshZone(false),
-        isContentXBLScope(false),
         isUAWidgetScope(false),
         invisibleToDebugger(false),
         discardSource(false),
         metadata(cx),
         userContextId(0),
         originAttributes(cx) {}
 
   virtual bool Parse() override;
@@ -2367,17 +2366,16 @@ class MOZ_STACK_CLASS SandboxOptions : p
   bool wantComponents;
   bool wantExportHelpers;
   bool isWebExtensionContentScript;
   JS::RootedObject proto;
   nsCString sandboxName;
   JS::RootedObject sameZoneAs;
   bool freshCompartment;
   bool freshZone;
-  bool isContentXBLScope;
   bool isUAWidgetScope;
   bool invisibleToDebugger;
   bool discardSource;
   GlobalProperties globalProperties;
   JS::RootedValue metadata;
   uint32_t userContextId;
   JS::RootedObject originAttributes;