Bug 1276112 followup. Reinstate a null-check that got lost. r=mccr8
☠☠ backed out by 57253d7ecce8 ☠ ☠
authorBoris Zbarsky <bzbarsky@mit.edu>
Fri, 27 May 2016 15:00:13 -0400
changeset 338389 3bb683963f9886ad13a862e17fe812f2d3cb6b20
parent 338388 8aa6b27297b6aa94abb63b2430f7879f14dfa86a
child 338390 00e5d65e076c69b71bcecf143bb5bd78ccc8752e
push id6249
push userjlund@mozilla.com
push dateMon, 01 Aug 2016 13:59:36 +0000
treeherdermozilla-beta@bad9d4f5bf7e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmccr8
bugs1276112
milestone49.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 1276112 followup. Reinstate a null-check that got lost. r=mccr8
js/xpconnect/src/XPCJSRuntime.cpp
--- a/js/xpconnect/src/XPCJSRuntime.cpp
+++ b/js/xpconnect/src/XPCJSRuntime.cpp
@@ -614,17 +614,18 @@ bool XPCJSRuntime::UsefulToMergeZones() 
     for (auto iter = windowsById->Iter(); !iter.Done(); iter.Next()) {
         nsGlobalWindow* window = iter.Data();
         if (!window->IsInnerWindow() ||
             !window->AsInner()->IsCurrentInnerWindow()) {
             continue;
         }
 
         JSObject* reflector = window->FastGetGlobalJSObject();
-        if (JS::ObjectIsMarkedGray(reflector) &&
+        if (reflector &&
+            JS::ObjectIsMarkedGray(reflector) &&
             !js::IsSystemCompartment(js::GetObjectCompartment(reflector))) {
             return true;
         }
     }
 
     return false;
 }