commit 3fad66704cdf3a731b776aef0972ba46eb4c31b3 Author: Arthur Edelstein arthuredelstein@gmail.com Date: Tue Sep 15 12:40:18 2015 -0700
Bug #16855: Allow blobs to be downloaded on first-party pages
This patch may be made obsolete by Tanvi's work: https://bugzilla.mozilla.org/show_bug.cgi?id=1198559#c15 --- docshell/base/nsDocShell.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/docshell/base/nsDocShell.cpp b/docshell/base/nsDocShell.cpp index 317f072..03885534 100644 --- a/docshell/base/nsDocShell.cpp +++ b/docshell/base/nsDocShell.cpp @@ -10538,9 +10538,14 @@ nsDocShell::DoURILoad(nsIURI* aURI,
nsCOMPtr<nsINode> requestingNode; if (mScriptGlobal) { - requestingNode = mScriptGlobal->GetFrameElementInternal(); - if (!requestingNode) { + if (!aFileName.IsVoid()) { + // File is being downloaded. Assign current document to requesting node. requestingNode = mScriptGlobal->GetExtantDoc(); + } else { + requestingNode = mScriptGlobal->GetFrameElementInternal(); + if (!requestingNode) { + requestingNode = mScriptGlobal->GetExtantDoc(); + } } }
tbb-commits@lists.torproject.org