Closed Bug 1698192 Opened 2 years ago Closed 2 years ago

Accessing currentURI of a lazy browser while the browser is swapped corrupts the cached currentURI


(Firefox :: Tabbed Browser, defect)




89 Branch
Tracking Status
firefox89 --- fixed


(Reporter: robwu, Assigned: robwu)




(1 file)

There was a regression in extensions (bug 1694699) due to an incorrect value for currentURI. I have fixed the trigger in bug 1694699 for that specific test case and fixed another trigger in bug 1695346. But these fixes didn't touch the root cause in the tabbrowser/session restore code. I'll attach the fix for the root cause along with a regression test to this bug.

See for a concise explanation of the bug (and the fix).

Re-order calls in SessionStore.jsm to invoke the side-effect-free logic
before triggering observable events.

Clear (likely) stale value of the cached currentURI when lazy browsers
are swapped.

And while I was at it, I also fixed a bug that caused a lazy browser to
eagerly be unlazified because the unneeded mute() call on a lazy browser
unlazifies it (discovered when I added complete test coverage for this

Dao, do you have time to review this or should I look for a different reviewer?

The fix itself is just one line of code + moving existing code around.

Flags: needinfo?(dao+bmo)

Done, sorry for the delay.

Flags: needinfo?(dao+bmo)
Pushed by
Use correct currentURI during swapping of lazy browsers r=dao
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 89 Branch
You need to log in before you can comment on or make changes to this bug.