[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

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



commit 3fad66704cdf3a731b776aef0972ba46eb4c31b3
Author: Arthur Edelstein <arthuredelstein@xxxxxxxxx>
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();
+      }
     }
   }
 



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits