Bug 1081537 - Followup bustage fix. r=me
authorBobby Holley <bobbyholley@gmail.com>
Fri, 17 Oct 2014 19:08:45 +0200
changeset 211099 5bd3640ea381ed4bf560d16611e31cc44912ad0f
parent 211098 54f0944c9d07e6be6f7d0252ca8aaeb8e378bc2d
child 211100 8349f7102c814fad0861f6f3676b7f5028aa0838
push id11501
push usercbook@mozilla.com
push dateMon, 20 Oct 2014 13:53:11 +0000
treeherderb2g-inbound@d46a0089b8a6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersme
bugs1081537
milestone36.0a1
Bug 1081537 - Followup bustage fix. r=me
dom/base/ScriptSettings.cpp
--- a/dom/base/ScriptSettings.cpp
+++ b/dom/base/ScriptSettings.cpp
@@ -132,17 +132,17 @@ nsIDocument*
 GetEntryDocument()
 {
   nsIGlobalObject* global = GetEntryGlobal();
   nsCOMPtr<nsPIDOMWindow> entryWin = do_QueryInterface(global);
 
   // If our entry global isn't a window, see if it's an addon scope associated
   // with a window. If it is, the caller almost certainly wants that rather
   // than null.
-  if (!entryWin) {
+  if (!entryWin && global) {
     entryWin = xpc::AddonWindowOrNull(global->GetGlobalJSObject());
   }
 
   return entryWin ? entryWin->GetExtantDoc() : nullptr;
 }
 
 nsIGlobalObject*
 GetIncumbentGlobal()