diff options
author | Jory Pratt <anarchy@gentoo.org> | 2010-09-16 11:58:12 +0000 |
---|---|---|
committer | Jory Pratt <anarchy@gentoo.org> | 2010-09-16 11:58:12 +0000 |
commit | 8d4289c099dd2038a73c1808f445857e642370d1 (patch) | |
tree | 663bb758a069d905f83ba1130bf46547f1cc583f /net-libs/xulrunner/files | |
parent | Don't use stderr anymore, bug 326279. Move sed to add 'svn mkdir' to the prev... (diff) | |
download | gentoo-2-8d4289c099dd2038a73c1808f445857e642370d1.tar.gz gentoo-2-8d4289c099dd2038a73c1808f445857e642370d1.tar.bz2 gentoo-2-8d4289c099dd2038a73c1808f445857e642370d1.zip |
Fix potentional crash in windowwatcher
(Portage version: 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)) + |