Bug 1437382 - Part 6 - Switch to using PrivateBrowsing helper method in session store. r?esawin draft
authorJan Henning <jh+bugzilla@buttercookie.de>
Mon, 12 Feb 2018 20:37:07 +0100
changeset 761289 cad3279bc236bc08e1c3d93f4185c73f2469bf14
parent 761288 e146edabe9d179114059b52d6b7cc5ca5cae2c63
child 761290 84a78e6e6569fc4996251934a71549bc9b38edc4
push id100929
push usermozilla@buttercookie.de
push dateWed, 28 Feb 2018 22:01:37 +0000
reviewersesawin
bugs1437382
milestone60.0a1
Bug 1437382 - Part 6 - Switch to using PrivateBrowsing helper method in session store. r?esawin As far as I can tell, that line dates back to approximately the time Private- BrowsingUtils were introduced in the first place. MozReview-Commit-ID: BLn13X7DVJt
mobile/android/components/SessionStore.js
--- a/mobile/android/components/SessionStore.js
+++ b/mobile/android/components/SessionStore.js
@@ -1110,17 +1110,17 @@ SessionStore.prototype = {
     }
 
     let tabData = {};
     let tab = aWindow.BrowserApp.getTabForBrowser(aBrowser);
     tabData.entries = aHistory.entries;
     tabData.index = aHistory.index;
     tabData.attributes = { image: aBrowser.mIconURL };
     tabData.desktopMode = tab.desktopMode;
-    tabData.isPrivate = aBrowser.docShell.QueryInterface(Ci.nsILoadContext).usePrivateBrowsing;
+    tabData.isPrivate = PrivateBrowsingUtils.isBrowserPrivate(aBrowser);
     tabData.tabId = tab.id;
     tabData.parentId = tab.parentId;
 
     aBrowser.__SS_data = tabData;
   },
 
   _collectWindowData: function ss__collectWindowData(aWindow) {
     // Ignore windows not tracked by SessionStore