summaryrefslogtreecommitdiff
blob: 774e43ae4e59c168f4501b71b490276ee8bd1c53 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# HG changeset patch
# Parent e981d93d6534b48a75655ad886d494bd3bbe3ff2
# User Blake Kaplan <mrbkap@gmail.com>
Bug 594699 - Null check this to return to pre-bug 532730 behavior in pathological cases.

diff --git a/embedding/components/windowwatcher/src/nsWindowWatcher.cpp b/embedding/components/windowwatcher/src/nsWindowWatcher.cpp
--- a/embedding/components/windowwatcher/src/nsWindowWatcher.cpp
+++ b/embedding/components/windowwatcher/src/nsWindowWatcher.cpp
@@ -517,17 +517,17 @@ nsWindowWatcher::OpenWindowJSInternal(ns
   nsCOMPtr<nsIDocShellTreeItem>   newDocShellItem;  // from the new window
   JSContextAutoPopper             callerContextGuard;
 
   NS_ENSURE_ARG_POINTER(_retval);
   *_retval = 0;
 
   nsCOMPtr<nsIContentUtils> utils =
     do_GetService("@mozilla.org/content/contentutils;1");
-  if (!utils->IsSafeToRunScript()) {
+  if (utils && !utils->IsSafeToRunScript()) {
     return NS_ERROR_FAILURE;
   }
 
   GetWindowTreeOwner(aParent, getter_AddRefs(parentTreeOwner));
 
   if (aUrl) {
     rv = URIfromURL(aUrl, aParent, getter_AddRefs(uriToLoad));
     if (NS_FAILED(rv))