[tbb-commits] [tor-browser/tor-browser-38.2.1esr-5.0-2] Bug #16855: Allow blobs to be downloaded on first-party pages

mikeperry at torproject.org mikeperry at torproject.org
Thu Sep 17 07:20:45 UTC 2015


commit d23a2ee2fb629b410131e6ef778066316d51bb62
Author: Arthur Edelstein <arthuredelstein at 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();
+      }
     }
   }
 



More information about the tbb-commits mailing list