Bug 1435615 - Reuse the same process when loading URIs on about:newtab when requests have POST data. r=mconley
authorDrew Willcoxon <adw@mozilla.com>
Fri, 27 Apr 2018 10:48:42 -0700
changeset 469640 912879eb4c603bcc02ac385e655f972506afa119
parent 469639 0ec752913e9685f2e25ac1be4e16b822e58de2de
child 469641 6bf3a14e2f9e4c371edacd70ae4179f50202ae2a
push id9174
push userarchaeopteryx@coole-files.de
push dateMon, 30 Apr 2018 15:33:30 +0000
treeherdermozilla-beta@1b1a8ab75f1f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmconley
bugs1435615
milestone61.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1435615 - Reuse the same process when loading URIs on about:newtab when requests have POST data. r=mconley MozReview-Commit-ID: 201VupYACvX
toolkit/modules/E10SUtils.jsm
--- a/toolkit/modules/E10SUtils.jsm
+++ b/toolkit/modules/E10SUtils.jsm
@@ -232,21 +232,25 @@ var E10SUtils = {
 
       // If not originally loaded in this process allow it if the URI would
       // normally be allowed to load in this process by default.
       let remoteType = Services.appinfo.remoteType;
       return remoteType ==
         this.getRemoteTypeForURIObject(aURI, true, remoteType, webNav.currentURI);
     }
 
-    if (sessionHistory.count == 1 && webNav.currentURI.spec == "about:newtab") {
+    if (!aHasPostData &&
+        Services.appinfo.remoteType == WEB_REMOTE_TYPE &&
+        sessionHistory.count == 1 &&
+        webNav.currentURI.spec == "about:newtab") {
       // This is possibly a preloaded browser and we're about to navigate away for
       // the first time. On the child side there is no way to tell for sure if that
       // is the case, so let's redirect this request to the parent to decide if a new
-      // process is needed.
+      // process is needed. But we don't currently properly handle POST data in
+      // redirects (bug 1457520), so if there is POST data, don't return false here.
       return false;
     }
 
     // If the URI can be loaded in the current process then continue
     return this.shouldLoadURIInThisProcess(aURI);
   },
 
   redirectLoad(aDocShell, aURI, aReferrer, aTriggeringPrincipal, aFreshProcess, aFlags) {