If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

Session Restore immediately inserts lazy browsers for pinned tabs on startup

RESOLVED FIXED in Firefox 55

Status

()

Firefox
Session Restore
RESOLVED FIXED
6 months ago
6 months ago

People

(Reporter: past, Assigned: Kevin Jones)

Tracking

unspecified
Firefox 55
Points:
---

Firefox Tracking Flags

(firefox55 fixed)

Details

Attachments

(1 attachment)

(Reporter)

Description

6 months ago
I get this in the browser console on the latest nightly (Windows):

"[bug 1345098] Lazy browser prematurely inserted via 'messageManager' property access:
getter@chrome://browser/content/tabbrowser.xml:2115:45
pinTab@chrome://browser/content/tabbrowser.xml:266:11
ssi_restoreWindow@resource:///modules/sessionstore/SessionStore.jsm:3376:9
ssi_restoreWindows@resource:///modules/sessionstore/SessionStore.jsm:3542:5
initializeWindow@resource:///modules/sessionstore/SessionStore.jsm:1170:11
onBeforeBrowserWindowShown/<@resource:///modules/sessionstore/SessionStore.jsm:1319:9
process@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:922:23
walkerLoop@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:806:7
Promise*scheduleWalkerLoop@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:739:11
schedulePromise@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:770:7
Promise.prototype.then@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:455:5
push@resource://gre/modules/osfile/osfile_async_front.jsm:375:19
read@resource://gre/modules/osfile/osfile_async_front.jsm:1093:10
readJSON@resource://services-common/utils.js:385:12
get@resource://gre/modules/FxAccountsStorage.jsm:465:12
this.FxAccountsStorageManager.prototype._readPlainStorage<@resource://gre/modules/FxAccountsStorage.jsm:276:19
TaskImpl_run@resource://gre/modules/Task.jsm:319:42
TaskImpl@resource://gre/modules/Task.jsm:277:3
asyncFunction@resource://gre/modules/Task.jsm:252:14
this.FxAccountsStorageManager.prototype._initialize<@resource://gre/modules/FxAccountsStorage.jsm:97:38
TaskImpl_run@resource://gre/modules/Task.jsm:319:42
TaskImpl@resource://gre/modules/Task.jsm:277:3
asyncFunction@resource://gre/modules/Task.jsm:252:14
initialize@resource://gre/modules/FxAccountsStorage.jsm:65:32
newAccountState@resource://gre/modules/FxAccounts.jsm:412:5
initialize@resource://gre/modules/FxAccounts.jsm:386:32
this.FxAccounts@resource://gre/modules/FxAccounts.jsm:352:3
@resource://gre/modules/FxAccounts.jsm:1769:11
get@resource://gre/modules/XPCOMUtils.jsm:198:21
XPCU_moduleLambda@resource://gre/modules/XPCOMUtils.jsm:273:9
get@resource://gre/modules/XPCOMUtils.jsm:198:21
_needsSetup@chrome://browser/content/browser-syncui.js:100:5
_promiseUpdateUI@chrome://browser/content/browser-syncui.js:143:12
updateUI@chrome://browser/content/browser-syncui.js:136:5
init@chrome://browser/content/browser-syncui.js:57:5
_delayedStartup@chrome://browser/content/browser.js:1510:5
EventListener.handleEvent*onLoad@chrome://browser/content/browser.js:1239:5
onload@chrome://browser/content/browser.xul:1:1
"  tabbrowser.xml:2115:23
(Reporter)

Comment 1

6 months ago
I had to set javascript.options.asyncstack to true in about:config to get the entire stack. Not sure why it was set to false.
Do you have pinned tabs?
(Assignee)

Comment 3

6 months ago
I see we can handle pinning lazy browser tabs so they don't instantiate the browser, however, I am wondering if we just want to make pinned tabs non-lazy, in which case we would do explicitly in windowRestore.  Dao or Mike, do you have an opinion on this?
Flags: needinfo?(mdeboer)
Flags: needinfo?(dao+bmo)
(Assignee)

Comment 4

6 months ago
Created attachment 8862494 [details] [diff] [review]
1360239_explicitly_make_pinned_tabs_not_lazy.diff

Explicitly pinning tabs is easy, so I thought I would upload this in case we want to take that route.  Feel free to review it and carry it on if everyone thinks this is the best route.
Attachment #8862494 - Flags: feedback?(mdeboer)
Attachment #8862494 - Flags: feedback?(dao+bmo)
It looks like the fix is in Session Restore, and the Sync entries in the stack are coincidental? Updating the component; please feel free to move it back if that's not the case.
Component: Sync → Session Restore

Updated

6 months ago
Flags: needinfo?(dao+bmo)
Summary: Sync inserts all lazy browsers on startup → Session Restore immediately inserts lazy browsers for pinned tabs on startup

Comment 6

6 months ago
Comment on attachment 8862494 [details] [diff] [review]
1360239_explicitly_make_pinned_tabs_not_lazy.diff

Pinned tabs aren't and shouldn't be restored on demand, so we can't make them lazy.
Attachment #8862494 - Flags: review+
Attachment #8862494 - Flags: feedback?(mdeboer)
Attachment #8862494 - Flags: feedback?(dao+bmo)

Updated

6 months ago
Assignee: nobody → kevinhowjones
Status: NEW → ASSIGNED
Flags: needinfo?(mdeboer)

Comment 7

6 months ago
Pushed by dgottwald@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/fa59e2b98040
Explicitly make pinned tabs nonlazy. r=dao
Good change, thanks.

Comment 9

6 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/fa59e2b98040
Status: ASSIGNED → RESOLVED
Last Resolved: 6 months ago
status-firefox55: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 55
You need to log in before you can comment on or make changes to this bug.