Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editorial: rearrange serialized state management #236

Merged
merged 1 commit into from
Jun 15, 2022
Merged

Conversation

domenic
Copy link
Collaborator

@domenic domenic commented Jun 6, 2022

Previously, we were setting an entry's serialized state as part of the end of the navigate() call. This will work less well after #235; there, we need to set the state right after the commit, but before any handlers are called. So this is a for-now-editorial rearrangement, to set the serialized state in a different place in the spec (but observably the same given the current API).

One part of this includes rearranging things so that if options["state"] is not given to reload() or navigate(), we now pass through the serialization of undefined, instead of passing through null. This allows null to be used as a sentinel for traverse cases. This change is also not observable, since getState() would turn null into undefined.


Preview | Diff

Previously, we were setting an entry's serialized state as part of the end of the navigate() call. This will work less well after #235; there, we need to set the state right after the commit, but before any handlers are called. So most of this patch is just a for-now-editorial rearrangement, to set the serialized state in a different place in the spec (but observably the same given the current API).

One part of this includes rearranging things so that if options["state"] is not given to reload() or navigate(), we now pass through the serialization of undefined, instead of passing through null. This allows null to be used as a sentinel for traverse cases. This change is also not observable, since getState() would turn null into undefined.
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Jun 6, 2022
Spec: WICG/navigation-api#236

Bug: 1183545

Change-Id: I203419f45a3dfba1b4dab3dc2672146b2da92ce3
aarongable pushed a commit to chromium/chromium that referenced this pull request Jun 6, 2022
Spec: WICG/navigation-api#236

Bug: 1183545

Change-Id: I203419f45a3dfba1b4dab3dc2672146b2da92ce3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3688183
Commit-Queue: Nate Chapin <japhet@chromium.org>
Auto-Submit: Nate Chapin <japhet@chromium.org>
Reviewed-by: Domenic Denicola <domenic@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1011166}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Jun 6, 2022
Spec: WICG/navigation-api#236

Bug: 1183545

Change-Id: I203419f45a3dfba1b4dab3dc2672146b2da92ce3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3688183
Commit-Queue: Nate Chapin <japhet@chromium.org>
Auto-Submit: Nate Chapin <japhet@chromium.org>
Reviewed-by: Domenic Denicola <domenic@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1011166}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Jun 6, 2022
Spec: WICG/navigation-api#236

Bug: 1183545

Change-Id: I203419f45a3dfba1b4dab3dc2672146b2da92ce3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3688183
Commit-Queue: Nate Chapin <japhet@chromium.org>
Auto-Submit: Nate Chapin <japhet@chromium.org>
Reviewed-by: Domenic Denicola <domenic@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1011166}
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Jun 10, 2022
…g commit, rather than after, a=testonly

Automatic update from web-platform-tests
Set the NavigationApi state object during commit, rather than after

Spec: WICG/navigation-api#236

Bug: 1183545

Change-Id: I203419f45a3dfba1b4dab3dc2672146b2da92ce3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3688183
Commit-Queue: Nate Chapin <japhet@chromium.org>
Auto-Submit: Nate Chapin <japhet@chromium.org>
Reviewed-by: Domenic Denicola <domenic@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1011166}

--

wpt-commits: 388d5f6e5e1c0939c6febccab56d5d1590b9b7b9
wpt-pr: 34320
@domenic domenic merged commit 388d56f into main Jun 15, 2022
@domenic domenic deleted the move-state-setting branch June 15, 2022 16:53
mjfroman pushed a commit to mjfroman/moz-libwebrtc-third-party that referenced this pull request Oct 14, 2022
Spec: WICG/navigation-api#236

Bug: 1183545

Change-Id: I203419f45a3dfba1b4dab3dc2672146b2da92ce3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3688183
Commit-Queue: Nate Chapin <japhet@chromium.org>
Auto-Submit: Nate Chapin <japhet@chromium.org>
Reviewed-by: Domenic Denicola <domenic@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1011166}
NOKEYCHECK=True
GitOrigin-RevId: b7d5ba957ac02eb4aef025b613561d5741011225
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant