Bug 1081537 - Followup bustage fix. r=me
authorBobby Holley <bobbyholley@gmail.com>
Fri, 17 Oct 2014 19:08:45 +0200
changeset 235391 5bd3640ea381ed4bf560d16611e31cc44912ad0f
parent 235390 54f0944c9d07e6be6f7d0252ca8aaeb8e378bc2d
child 235392 8349f7102c814fad0861f6f3676b7f5028aa0838
push id4311
push userraliiev@mozilla.com
push dateMon, 12 Jan 2015 19:37:41 +0000
treeherdermozilla-beta@150c9fed433b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersme
bugs1081537
milestone36.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 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()