Closed Bug 1593246 Opened 5 years ago Closed 4 years ago

Make current session storage implementation Fission-compatible

Categories

(Core :: Storage: localStorage & sessionStorage, defect, P1)

defect

Tracking

()

RESOLVED FIXED
mozilla73
Fission Milestone M4.1
Tracking Status
firefox-esr68 --- wontfix
firefox71 --- wontfix
firefox72 --- wontfix
firefox73 --- fixed

People

(Reporter: ytausky, Assigned: ytausky)

References

Details

Attachments

(5 files)

When the frame is replaced from example.org in process A to example.com the new page is loaded in another process B, but when the frame is replaced again back to example.org it lands in a third process C, which doesn't have session storage data from process A.

My current understanding of what needs to be done:

  1. When navigating a window, all of its session storage entries (transitively including nested windows) need to be sent to the parent process.
  2. When loading a document in a window, all session storage entries for the document's origin need to get fetched from the parent process and populated before any scripts are run.
  3. Since sessionstore also needs this information and collects it periodically, the existing code could be partially reused.

Jan, please have a look when you're back and let me know if that's correct.

Flags: needinfo?(jvarga)

This may be connected to bug 1445464, as avoiding copying this data around during navigations should help with preserving it.

It's related, but we won't be able to get to that for a while, so we'll need to get the current implementation to work with Fission.

Flags: needinfo?(jvarga)
Summary: Make dom/tests/mochitest/sessionstorage/test_sessionStorageReplace.html green with Fission → Make current session storage implementation Fission-compatible

BTW, here's a Pernosco session running dom/tests/mochitest/sessionstorage/test_sessionStorageReplace.html (and failing).

Tentatively moving all bugs whose summaries mention "Fission" (or other Fission-related keywords) but are not assigned to a Fission Milestone to the "?" triage milestone.

This will generate a lot of bugmail, so you can filter your bugmail for the following UUID and delete them en masse:

0ee3c76a-bc79-4eb2-8d12-05dc0b68e732

Fission Milestone: --- → ?

Tracking session storage work for Fission Nightly milestone (M6).

Fission Milestone: ? → M6

With Fission enabled we do not necessarily have access to the
nsDocShell that holds the top-level browsing context, so the
BrowsingContext is a better place to store information that needs
to be accessible to nested browsing contexts.

Attachment #9112538 - Attachment description: Bug 1593246 - Part 1: Move SessionStorageManager to BrowsingContext → Bug 1593246 - Part 1: Move SessionStorageManager to BrowsingContext r=#dom-workers-and-storage-reviewers

This reference is necessary when sending session storage data for
all browsing context to the parent process. Note that it entails
making SessionStorageManager a cycle collection participant, since
adding this reference creates a cycle.

Depends on D55276

This commit implements a simple data replication scheme, where
each content process receives a copy of the relevant session
storage data when navigating, and sending all its session storage
data to the parent process before shutting down.

Depends on D55661

Resetting Fission milestone to M4.1. Yaron pointed out that this bug is about sessionStorage, not session restore. :)

Fission Milestone: M6 → M4.1
Pushed by ytausky@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/d9f0d827e28d
Part 1: Move SessionStorageManager to BrowsingContext r=dom-workers-and-storage-reviewers,sg,smaug
https://hg.mozilla.org/integration/autoland/rev/2663311a1b62
Part 2: Give SessionStorageManager a reference to BrowsingContext r=sg
https://hg.mozilla.org/integration/autoland/rev/fd389138a684
Part 3: Remove unused parameter from SessionStorageManager::GetSessionStorageCacheHelper r=dom-workers-and-storage-reviewers,sg
Keywords: leave-open
Attachment #9113208 - Attachment description: Bug 1593246 - Part 5: Replicate session storage data r=janv → Bug 1593246 - Part 5: Replicate session storage data r=janv,asuth

I fixed the problem and will try to land the patches again tomorrow.

Flags: needinfo?(ytausky)
Pushed by ytausky@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/433fd567ff92
Part 1: Move SessionStorageManager to BrowsingContext r=dom-workers-and-storage-reviewers,sg,smaug
https://hg.mozilla.org/integration/autoland/rev/c11ce752a12e
Part 2: Give SessionStorageManager a reference to BrowsingContext r=sg
https://hg.mozilla.org/integration/autoland/rev/44fb598d3ad8
Part 3: Remove unused parameter from SessionStorageManager::GetSessionStorageCacheHelper r=dom-workers-and-storage-reviewers,sg
https://hg.mozilla.org/integration/autoland/rev/de6b543ce6d7
Part 4: Overload SessionStorageManager::GetSessionStorageCacheHelper r=dom-workers-and-storage-reviewers,asuth
Pushed by ytausky@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/aea23435804b
Part 5: Replicate session storage data r=janv,asuth
Keywords: leave-open
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla73
Regressions: 1603976
Regressions: 1616081
Blocks: 1660485
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: