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

Categories

(Firefox :: Tabbed Browser, defect)

defect

Tracking

()

RESOLVED FIXED
89 Branch
Tracking Status
firefox89 --- fixed

People

(Reporter: robwu, Assigned: robwu)

References

Details

Attachments

(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 https://bugzilla.mozilla.org/show_bug.cgi?id=1695346#c1 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
change).

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 rob@robwu.nl:
https://hg.mozilla.org/integration/autoland/rev/6820a8d06219
Use correct currentURI during swapping of lazy browsers r=dao
Status: ASSIGNED → RESOLVED
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.