Bug 1174594 (part 3) - Remove ShutdownData. r=mrbkap.
authorNicholas Nethercote <nnethercote@mozilla.com>
Thu, 18 Jun 2015 15:34:27 -0700
changeset 280451 325631a7b72a75d24301ff8f456fba7577119ebd
parent 280450 81945c5fa51dbfe019a8e9161823fdb5c9d0d147
child 280452 bf2f1318c3c052e9da173c32ed1dab4de2a4a30c
push id4932
push userjlund@mozilla.com
push dateMon, 10 Aug 2015 18:23:06 +0000
treeherdermozilla-beta@6dd5a4f5f745 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmrbkap
bugs1174594
milestone41.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 1174594 (part 3) - Remove ShutdownData. r=mrbkap. It's written to but never read from.
js/xpconnect/src/XPCWrappedNativeScope.cpp
--- a/js/xpconnect/src/XPCWrappedNativeScope.cpp
+++ b/js/xpconnect/src/XPCWrappedNativeScope.cpp
@@ -615,33 +615,22 @@ XPCWrappedNativeScope::KillDyingScopes()
         if (cur->mGlobalJSObject)
             CompartmentPrivate::Get(cur->mGlobalJSObject)->scope = nullptr;
         delete cur;
         cur = next;
     }
     gDyingScopes = nullptr;
 }
 
-struct ShutdownData
-{
-    ShutdownData()
-        : wrapperCount(0),
-          protoCount(0) {}
-    int wrapperCount;
-    int protoCount;
-};
-
 //static
 void
 XPCWrappedNativeScope::SystemIsBeingShutDown()
 {
     int liveScopeCount = 0;
 
-    ShutdownData data;
-
     XPCWrappedNativeScope* cur;
 
     // First move all the scopes to the dying list.
 
     cur = gScopes;
     while (cur) {
         XPCWrappedNativeScope* next = cur->mNext;
         cur->mNext = gDyingScopes;
@@ -660,25 +649,23 @@ XPCWrappedNativeScope::SystemIsBeingShut
         if (cur->mComponents)
             cur->mComponents->SystemIsBeingShutDown();
 
         // Walk the protos first. Wrapper shutdown can leave dangling
         // proto pointers in the proto map.
         for (auto i = cur->mWrappedNativeProtoMap->RemovingIter(); !i.Done(); i.Next()) {
             auto entry = static_cast<ClassInfo2WrappedNativeProtoMap::Entry*>(i.Get());
             entry->value->SystemIsBeingShutDown();
-            data.protoCount++;
             i.Remove();
         }
         for (auto i = cur->mWrappedNativeMap->RemovingIter(); !i.Done(); i.Next()) {
             auto entry = static_cast<Native2WrappedNativeMap::Entry*>(i.Get());
             XPCWrappedNative* wrapper = entry->value;
             if (wrapper->IsValid()) {
                 wrapper->SystemIsBeingShutDown();
-                data.wrapperCount++;
             }
             i.Remove();
         }
     }
 
     // Now it is safe to kill all the scopes.
     KillDyingScopes();
 }