diff options
Diffstat (limited to 'net-libs/xulrunner/files')
-rw-r--r-- | net-libs/xulrunner/files/fix_crash_in_windowwatcher.patch | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/net-libs/xulrunner/files/fix_crash_in_windowwatcher.patch b/net-libs/xulrunner/files/fix_crash_in_windowwatcher.patch new file mode 100644 index 000000000000..774e43ae4e59 --- /dev/null +++ b/net-libs/xulrunner/files/fix_crash_in_windowwatcher.patch @@ -0,0 +1,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)) + |