diff options
author | 2010-09-16 11:58:12 +0000 | |
---|---|---|
committer | 2010-09-16 11:58:12 +0000 | |
commit | 357d6c2bef84439b690275269f04942e46890128 (patch) | |
tree | 6940edd70ba2c9c7223abbfb1b28ecf64b4b744e /net-libs/xulrunner/files | |
parent | Don't use stderr anymore, bug 326279. Move sed to add 'svn mkdir' to the prev... (diff) | |
download | historical-357d6c2bef84439b690275269f04942e46890128.tar.gz historical-357d6c2bef84439b690275269f04942e46890128.tar.bz2 historical-357d6c2bef84439b690275269f04942e46890128.zip |
Fix potentional crash in windowwatcher
Package-Manager: portage-2.1.9.7/cvs/Linux x86_64
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)) + |