Bug 1533302 part 1 - Remove unused XPCWrappedNativeScope::IsDyingScope. r=mccr8
authorJan de Mooij <jdemooij@mozilla.com>
Thu, 07 Mar 2019 19:05:36 +0000
changeset 521031 e1ba6af4a982c8ddfff2814a6bd8c4df5fb3789e
parent 521030 4e646efc209aa46b03cbbe43f6b64c0e9356b2e4
child 521032 1b1bcfe92e219b27e6b95481d54035d9f6b06f0a
push id10862
push userffxbld-merge
push dateMon, 11 Mar 2019 13:01:11 +0000
treeherdermozilla-beta@a2e7f5c935da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmccr8
bugs1533302
milestone67.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 1533302 part 1 - Remove unused XPCWrappedNativeScope::IsDyingScope. r=mccr8 Differential Revision: https://phabricator.services.mozilla.com/D22491
js/xpconnect/src/XPCWrappedNativeScope.cpp
js/xpconnect/src/xpcprivate.h
--- a/js/xpconnect/src/XPCWrappedNativeScope.cpp
+++ b/js/xpconnect/src/XPCWrappedNativeScope.cpp
@@ -85,26 +85,16 @@ XPCWrappedNativeScope::XPCWrappedNativeS
   // remote XUL domains, _except_ if we have an additional pref override set.
   //
   // Note that we can't quite remove this yet, even though we never actually
   // use XBL scopes, because some code (including the security manager) uses
   // this boolean to make decisions that we rely on in our test infrastructure.
   mAllowContentXBLScope = !RemoteXULForbidsXBLScope(aFirstGlobal);
 }
 
-// static
-bool XPCWrappedNativeScope::IsDyingScope(XPCWrappedNativeScope* scope) {
-  for (XPCWrappedNativeScope* cur = gDyingScopes; cur; cur = cur->mNext) {
-    if (scope == cur) {
-      return true;
-    }
-  }
-  return false;
-}
-
 bool XPCWrappedNativeScope::GetComponentsJSObject(JS::MutableHandleObject obj) {
   AutoJSContext cx;
   if (!mComponents) {
     bool system = AccessCheck::isChrome(mCompartment);
     mComponents =
         system ? new nsXPCComponents(this) : new nsXPCComponentsBase(this);
   }
 
--- a/js/xpconnect/src/xpcprivate.h
+++ b/js/xpconnect/src/xpcprivate.h
@@ -881,18 +881,16 @@ class XPCWrappedNativeScope final {
     size_t mProtoAndIfaceCacheSize;
   };
 
   static void AddSizeOfAllScopesIncludingThis(JSContext* cx,
                                               ScopeSizeInfo* scopeSizeInfo);
 
   void AddSizeOfIncludingThis(JSContext* cx, ScopeSizeInfo* scopeSizeInfo);
 
-  static bool IsDyingScope(XPCWrappedNativeScope* scope);
-
   // Gets the appropriate scope object for XBL in this compartment. This method
   // relies on compartment-per-global still (and release-asserts this). The
   // context must be same-realm with this compartment's single global upon
   // entering, and the scope object is wrapped into this compartment.
   JSObject* EnsureContentXBLScope(JSContext* cx);
 
   // Check whether our mAllowContentXBLScope state matches the given
   // principal.  This is used to avoid sharing compartments on