Bug 1044205 - Detach the XPCWrappedNativeScope from the CompartmentPrivate during forcible shutdown. r=billm, a=sledru
authorBobby Holley <bobbyholley@gmail.com>
Tue, 29 Jul 2014 08:48:32 -0700
changeset 208228 a979f156f8d1
parent 208227 b7316976ca8b
child 208229 7fb3c0ed4417
push id3782
push userryanvm@gmail.com
push date2014-08-04 16:21 +0000
treeherdermozilla-beta@e61371be0f38 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbillm, sledru
bugs1044205
milestone32.0
Bug 1044205 - Detach the XPCWrappedNativeScope from the CompartmentPrivate during forcible shutdown. r=billm, a=sledru
js/xpconnect/src/XPCWrappedNativeScope.cpp
--- a/js/xpconnect/src/XPCWrappedNativeScope.cpp
+++ b/js/xpconnect/src/XPCWrappedNativeScope.cpp
@@ -487,16 +487,18 @@ XPCWrappedNativeScope::SweepAllWrappedNa
 
 // static
 void
 XPCWrappedNativeScope::KillDyingScopes()
 {
     XPCWrappedNativeScope* cur = gDyingScopes;
     while (cur) {
         XPCWrappedNativeScope* next = cur->mNext;
+        if (cur->mGlobalJSObject)
+            CompartmentPrivate::Get(cur->mGlobalJSObject)->scope = nullptr;
         delete cur;
         cur = next;
     }
     gDyingScopes = nullptr;
 }
 
 struct ShutdownData
 {