FileSystemHandle: add more serialization coverage#59933
Merged
Conversation
webkit-commit-queue
pushed a commit
to annevk/WebKit
that referenced
this pull request
May 18, 2026
…oth handles https://bugs.webkit.org/show_bug.cgi?id=314973 Reviewed by Sihui Liu. isSameEntry only called ensureIdentifier on `this`; the other handle's m_identifier was assumed to already be set. That assumption holds when the handle was created via getFileHandle / getDirectoryHandle, since the WebProcess gets a FileSystemHandleIdentifier as part of the roundtrip. It does not hold for a handle that was deserialized from postMessage / structuredClone: the deserializer constructs the handle with an empty Markable<FileSystemHandleIdentifier> and calls markAsUnresolved, so handle->identifier() (which is *m_identifier) release-asserts in Markable.h. Test: imported/w3c/web-platform-tests/fs/script-tests/FileSystemBaseHandle-isSameEntry.js Upstream: web-platform-tests/wpt#59933 Canonical link: https://commits.webkit.org/313396@main
annevk
added a commit
to annevk/WebKit
that referenced
this pull request
May 18, 2026
https://bugs.webkit.org/show_bug.cgi?id=314974 Reviewed by NOBODY (OOPS!). navigator.storage.getDirectory() constructed the root FileSystemDirectoryHandle with a null string for its name argument. Round-tripping the handle through structured clone results in an empty string. This means that isSameEntry() will treat them differently. The specification uses an empty string so follow that. Test: imported/w3c/web-platform-tests/fs/script-tests/FileSystemBaseHandle-isSameEntry.js Upstream: web-platform-tests/wpt#59933
webkit-commit-queue
pushed a commit
to annevk/WebKit
that referenced
this pull request
May 18, 2026
https://bugs.webkit.org/show_bug.cgi?id=314974 Reviewed by Sihui Liu. navigator.storage.getDirectory() constructed the root FileSystemDirectoryHandle with a null string for its name argument. Round-tripping the handle through structured clone results in an empty string. This means that isSameEntry() will treat them differently. The specification uses an empty string so follow that. Test: imported/w3c/web-platform-tests/fs/script-tests/FileSystemBaseHandle-isSameEntry.js Upstream: web-platform-tests/wpt#59933 Canonical link: https://commits.webkit.org/313397@main
noamr
approved these changes
May 18, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.