Copy SessionStorage into windows created with CreateWindowInOtherProcess

NEW
Assigned to
(NeedInfo from)

Status

()

Core
Window Management
11 days ago
8 days ago

People

(Reporter: mystor, Assigned: mystor, NeedInfo)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(4 attachments, 1 obsolete attachment)

(Assignee)

Description

11 days ago
We need this right now in order to implement bug 1370971 according to spec, but we would like to not need to do this (see https://github.com/whatwg/html/issues/2681).

Let's implement this behind a pref so we can decide what we want.
(Assignee)

Comment 1

10 days ago
Created attachment 8877751 [details] [diff] [review]
Copy sessionStorage across processes when opening windows

This patch implements the feature in the simplest way I could think of, which is
using the copy of sessionStorage in sessionstore.

Ideally we'd have a better solution for this.

Doing a try run before I ask for review.

MozReview-Commit-ID: 6f3PMyZSAkd
(Assignee)

Comment 2

9 days ago
Created attachment 8878143 [details] [diff] [review]
Part 1: Update the browser_noopener test to also test sessionstorage copying

MozReview-Commit-ID: lvLAfuZYFm
Attachment #8878143 - Flags: review?(bzbarsky)
(Assignee)

Updated

9 days ago
Attachment #8877751 - Attachment is obsolete: true
(Assignee)

Comment 3

9 days ago
Created attachment 8878145 [details] [diff] [review]
Part 2: Add an API to desktop SessionStore to copy SessionStorage between browsers

This was the easiest way I could think of to copy SessionStorage between browsers across processes right now. Baku, I was told you might know things about the future of LocalStorage and SessionStorage, and perhaps you might have an idea of a better/easier way to do this?

Holding off on asking for review on the remaining parts of this bug until I get feedback :).

MozReview-Commit-ID: 2Hfw3SWcLAY
Attachment #8878145 - Flags: feedback?(amarchesini)
(Assignee)

Comment 4

9 days ago
Created attachment 8878146 [details] [diff] [review]
Part 3: Use SessionStore to copy SessionStorage in CreateWindowInDifferentProcess

MozReview-Commit-ID: AulvjpdDU5G
(Assignee)

Comment 5

9 days ago
Created attachment 8878147 [details] [diff] [review]
Part 4: Enable copying SessionStorage in CreateWindowInDifferentProcess by default

MozReview-Commit-ID: 53U4XvrH0E1
Comment on attachment 8878143 [details] [diff] [review]
Part 1: Update the browser_noopener test to also test sessionstorage copying

r=me, I think.  I assume the test at least fails without these changes and passes with.  ;)
Attachment #8878143 - Flags: review?(bzbarsky) → review+
(Assignee)

Comment 7

8 days ago
This actually doesn't work very well (I mess up the loading semantics in part 3, and that means that if we open too many windows at once you can race and fail to open some of them after my changes).

I can probably adapt this patch to make it work (I'd have to probably start the SessionStore flush on the child side before sending the request, and then read it on the parent side, shoving propagating some reference to the SessionStorage information through the Js code which triggers the initial load). It would be awesome if there was a better way to do this, or if we had plans to change SessionStorage already which would make my life easier.
Flags: needinfo?(amarchesini)
(Assignee)

Updated

8 days ago
Attachment #8878145 - Flags: feedback?(amarchesini)
You need to log in before you can comment on or make changes to this bug.