Bug 1339519 - Set "pending" attribute on browser when creating a new delay-loaded tab. r?sebastian draft
authorJan Henning <jh+bugzilla@buttercookie.de>
Fri, 17 Feb 2017 18:43:52 +0100
changeset 486250 751e1bb0efbd4da9a084bc73638931c0b5e328cb
parent 486170 7020030ddeb1c79d164a0042dc6f270c30bd69e7
child 546197 9283e46c39cd9aa50667adf07fcc2db0a3fb63de
push id45929
push usermozilla@buttercookie.de
push dateFri, 17 Feb 2017 17:47:54 +0000
reviewerssebastian
bugs1339519
milestone54.0a1
Bug 1339519 - Set "pending" attribute on browser when creating a new delay-loaded tab. r?sebastian I don't think we ever check this attribute in our code and rely on the presence of "__SS_restore" instead, but we should fix this for consistency and any add-ons or future code that might depend on this. MozReview-Commit-ID: JwB6kpiKsaR
mobile/android/chrome/content/browser.js
--- a/mobile/android/chrome/content/browser.js
+++ b/mobile/android/chrome/content/browser.js
@@ -3630,16 +3630,17 @@ Tab.prototype = {
       tabId: this.id,
       parentId: this.parentId
     };
 
     if (aParams.delayLoad) {
       // If this is a zombie tab, mark the browser for delay loading, which will
       // restore the tab when selected using the session data added above
       this.browser.__SS_restore = true;
+      this.browser.setAttribute("pending", "true");
     } else {
       let flags = "flags" in aParams ? aParams.flags : Ci.nsIWebNavigation.LOAD_FLAGS_NONE;
       let postData = ("postData" in aParams && aParams.postData) ? aParams.postData.value : null;
       let referrerURI = "referrerURI" in aParams ? aParams.referrerURI : null;
       let charset = "charset" in aParams ? aParams.charset : null;
 
       // The search term the user entered to load the current URL
       this.userRequested = "userRequested" in aParams ? aParams.userRequested : "";