Bug 1329822 - file:// documents can't use <a download=foo.txt> to set a download name/force a download; r?gijs draft
authorHaik Aftandilian <haftandilian@mozilla.com>
Fri, 13 Jan 2017 11:55:38 -0800
changeset 468334 93055f06b4c78b2fad2edfc5484967863376e76f
parent 468328 6913601f12824159fb3a507be42b872347e6125d
child 543916 f084771503949b1103acb54b92754f1a98e22c21
push id43429
push userhaftandilian@mozilla.com
push dateTue, 31 Jan 2017 01:54:36 +0000
reviewersgijs
bugs1329822
milestone54.0a1
Bug 1329822 - file:// documents can't use <a download=foo.txt> to set a download name/force a download; r?gijs MozReview-Commit-ID: 9cRepRafhWO
browser/modules/E10SUtils.jsm
--- a/browser/modules/E10SUtils.jsm
+++ b/browser/modules/E10SUtils.jsm
@@ -66,19 +66,21 @@ this.E10SUtils = {
       aURL = "about:blank";
     }
 
     // Javascript urls can load in any process, they apply to the current document
     if (aURL.startsWith("javascript:")) {
       return aPreferredRemoteType;
     }
 
-    // We need data: URIs to load in any remote process, because some of our
-    // tests rely on this.
-    if (aURL.startsWith("data:")) {
+    // We need data: URI's to load in a remote process, because some of our
+    // tests rely on this. For blob: URI's, load them in their originating
+    // process unless it is non-remote. In that case, favor a remote (sandboxed)
+    // process with fewer privileges to limit exposure.
+    if (aURL.startsWith("data:") || aURL.startsWith("blob:")) {
       return aPreferredRemoteType == NOT_REMOTE ? DEFAULT_REMOTE_TYPE
                                                 : aPreferredRemoteType;
     }
 
     if (aURL.startsWith("file:")) {
       return Services.prefs.getBoolPref("browser.tabs.remote.separateFileUriProcess")
              ? FILE_REMOTE_TYPE : DEFAULT_REMOTE_TYPE;
     }