From e0a43bc995d1ce1b808c5e72ff18333f096d1878 Mon Sep 17 00:00:00 2001 From: "bzbarsky%mit.edu" Date: Sun, 7 Oct 2007 18:26:02 +0000 Subject: [PATCH] Give the about:blank document we create when loading a javascript: URI from history the principal of the history entry so the JS will actually execute against that about:blank, not in a sandbox. Bug 384014, r+sr+a=jst git-svn-id: svn://10.0.0.236/trunk@237380 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/docshell/base/nsDocShell.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mozilla/docshell/base/nsDocShell.cpp b/mozilla/docshell/base/nsDocShell.cpp index 15822bb6e5c..8c07f26b6c2 100644 --- a/mozilla/docshell/base/nsDocShell.cpp +++ b/mozilla/docshell/base/nsDocShell.cpp @@ -8014,7 +8014,8 @@ nsDocShell::LoadHistoryEntry(nsISHEntry * aEntry, PRUint32 aLoadType) // Replace the current document with about:blank now to prevent // anything from the current document from leaking into any JavaScript // code in the URL. - rv = CreateAboutBlankContentViewer(nsnull); + nsCOMPtr prin = do_QueryInterface(owner); + rv = CreateAboutBlankContentViewer(prin); if (NS_FAILED(rv)) { // The creation of the intermittent about:blank content