forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reland "Use the same SessionStorageNamespace for prerendering"
This is a reland of eefb8c5 The original CL was reverted because the PrerenderBackForwardCacheBrowserTest was flaky. The test didn’t check the behavior of BackForwardCache. It was just running the same tests of PrerenderBrowserTest.SessionStorageAfterBackNavigation_NoProcessReuse or SessionStorageAfterBackNavigation_KeepInitialProcess. If the initial process have been killed before the back navigation, the test failed. To make the BackForwardCache logic work this CL changed the browser test as followings: - Added enable_same_site flag. - Stopped using BroadcastChannel which prevent BFCache. PS1 is the same as the original CL. Original change's description: > Use the same SessionStorageNamespace for prerendering > > Currently there is an issue that the Session Storage is not carried over > to the prerendering page. This is because a new Session Storage > Namespace is used for the prerendering page. > > To fix this issue, this CL changes PrerenderHost::PageHolder to copy the > Session Storage Namespace from the initiator page to the prerendering > page. > > We don’t want the Session Storage state in the storage service be > updated by the prerendering page. And we want to synchronize the Session > Storage state of the prerendering page with the initiator page when the > prerendering page is activated. So this CL introduces a flag > |is_session_storage_for_prerendering_| in CachedStorageArea, and make > CachedStorageArea not to send the changes of the Session Storage state > to the storage service, and make StorageArea recreate |cached_area_| > when the prerendering page is activated. > > This is the "clone & swap" mechanism for session storage in prerendering > described in whatwg/storage#119. > > This CL still has an issue that when the initial renderer process is > reused after the back navigation from a prerendered page, the Session > Storage state is not correctly propagated to the initial renderer > process. This issue will be fixed in the next CL. > https://crrev.com/c/2849654 > > Bug: 1197383 > Change-Id: Ib43386ccf75f8c867bcddb4b77b333ee0d5b5d79 > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2850242 > Reviewed-by: Kinuko Yasuda <[email protected]> > Reviewed-by: Matt Falkenhagen <[email protected]> > Reviewed-by: Marijn Kruisselbrink <[email protected]> > Commit-Queue: Tsuyoshi Horo <[email protected]> > Cr-Commit-Position: refs/heads/master@{#881985} Bug: 1197383 Change-Id: If83c11d44e37b598111ab1c5ce4a78dfd3757176 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2891279 Reviewed-by: Hiroki Nakagawa <[email protected]> Reviewed-by: Kinuko Yasuda <[email protected]> Reviewed-by: Fergal Daly <[email protected]> Reviewed-by: Matt Falkenhagen <[email protected]> Commit-Queue: Tsuyoshi Horo <[email protected]> Cr-Commit-Position: refs/heads/master@{#883819}
- Loading branch information
Showing
21 changed files
with
711 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.