Bug 1226781 - only manually switch remoteness if we were trying to switch remoteness to begin with, r=mconley
☠☠ backed out by 8696e9783a9f ☠ ☠
authorGijs Kruitbosch <gijskruitbosch@gmail.com>
Fri, 22 Jan 2016 11:27:06 +0000
changeset 281609 627ac298f23043bd185b802fe042dee054c8e1b2
parent 281608 c6bd409ec6555a3f38de8ab9183c3f69a7f1668e
child 281610 3ae6880a94e45d360992daacfefa85239c729309
push id17244
push usergijskruitbosch@gmail.com
push dateTue, 26 Jan 2016 17:22:28 +0000
treeherderfx-team@050018247a87 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmconley
bugs1226781
milestone47.0a1
Bug 1226781 - only manually switch remoteness if we were trying to switch remoteness to begin with, r=mconley
browser/base/content/browser.js
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -848,24 +848,29 @@ function _loadURIWithFlags(browser, uri,
         uri: uri,
         flags: flags,
         referrer: referrer ? referrer.spec : null,
         referrerPolicy: referrerPolicy,
         postData: postData,
       });
     }
   } catch (e) {
-    // If anything goes wrong just switch remoteness manually and load the URI.
+    // If anything goes wrong when switching remoteness, just switch remoteness
+    // manually and load the URI.
     // We might lose history that way but at least the browser loaded a page.
     // This might be necessary if SessionStore wasn't initialized yet i.e.
     // when the homepage is a non-remote page.
-    Cu.reportError(e);
-    gBrowser.updateBrowserRemotenessByURL(browser, uri);
-    browser.webNavigation.loadURIWithOptions(uri, flags, referrer, referrerPolicy,
-                                             postData, null, null);
+    if (mustChangeProcess) {
+      Cu.reportError(e);
+      gBrowser.updateBrowserRemotenessByURL(browser, uri);
+      browser.webNavigation.loadURIWithOptions(uri, flags, referrer, referrerPolicy,
+                                               postData, null, null);
+    } else {
+      throw e;
+    }
   } finally {
     if (browser.userTypedClear) {
       browser.userTypedClear--;
     }
   }
 }
 
 // Starts a new load in the browser first switching the browser to the correct