-
Notifications
You must be signed in to change notification settings - Fork 19
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
Cursor support for FileSystemSyncAccessHandle #76
Conversation
Co-authored-by: Anne van Kesteren <annevk@annevk.nl>
Co-authored-by: Anne van Kesteren <annevk@annevk.nl>
Co-authored-by: Anne van Kesteren <annevk@annevk.nl>
Co-authored-by: Anne van Kesteren <annevk@annevk.nl>
Co-authored-by: Anne van Kesteren <annevk@annevk.nl>
Co-authored-by: Anne van Kesteren <annevk@annevk.nl>
Co-authored-by: Anne van Kesteren <annevk@annevk.nl>
Co-authored-by: Anne van Kesteren <annevk@annevk.nl>
Thanks for the careful review, @annevk ! |
index.bs
Outdated
@@ -1048,6 +1048,8 @@ as well as obtaining and changing the size of, a single file. | |||
A {{FileSystemSyncAccessHandle}} offers synchronous methods. This allows for higher performance on | |||
contexts where asynchronous operations come with high overhead, e.g., WebAssembly. | |||
|
|||
A {{FileSystemWritableFileStream}} has a <dfn for="FileSystemWritableFileStream">file position cursor</dfn> initialized at byte offset 0 from the top of the file. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both a FileSystemSyncAccessHandle
and FileSystemWritableFileStream
should have a cursor, right? And does this need to be explicitly initialized to 0 in the "create a new FileSystemSyncAccessHandle" algorithm below?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's usually fine to state the default value of an internal field upfront like is done here.
Co-authored-by: Austin Sullivan <asully@google.com>
Note that the existing cursor for WritableFileStream should have normative text for [=FileSystemWritableFileStream/file position cursor=]; right now all references are in non-normative text. I'm considering this a separate issue |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM apart from one question, but I'd wait for the +1 from Anne before merging. Thanks for putting this together!
Co-authored-by: Anne van Kesteren <annevk@annevk.nl>
Co-authored-by: Anne van Kesteren <annevk@annevk.nl>
Question: with this change, should |
Filed #81. |
Specified at whatwg/fs#76 This only makes sense if the "at" option is optional, so that was later specified here: whatwg/fs#82 Fixed: 1394790 Change-Id: I51e7343d221c1b89dfb10e22434d9d213e152b2d
Specified at whatwg/fs#76 This only makes sense if the "at" option is optional, so that was later specified here: whatwg/fs#82 Fixed: 1394790 Change-Id: I51e7343d221c1b89dfb10e22434d9d213e152b2d Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4137091 Auto-Submit: Austin Sullivan <asully@chromium.org> Commit-Queue: Austin Sullivan <asully@chromium.org> Reviewed-by: Daseul Lee <dslee@chromium.org> Cr-Commit-Position: refs/heads/main@{#1093907}
Specified at whatwg/fs#76 This only makes sense if the "at" option is optional, so that was later specified here: whatwg/fs#82 Fixed: 1394790 Change-Id: I51e7343d221c1b89dfb10e22434d9d213e152b2d Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4137091 Auto-Submit: Austin Sullivan <asully@chromium.org> Commit-Queue: Austin Sullivan <asully@chromium.org> Reviewed-by: Daseul Lee <dslee@chromium.org> Cr-Commit-Position: refs/heads/main@{#1093907}
Specified at whatwg/fs#76 This only makes sense if the "at" option is optional, so that was later specified here: whatwg/fs#82 Fixed: 1394790 Change-Id: I51e7343d221c1b89dfb10e22434d9d213e152b2d Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4137091 Auto-Submit: Austin Sullivan <asully@chromium.org> Commit-Queue: Austin Sullivan <asully@chromium.org> Reviewed-by: Daseul Lee <dslee@chromium.org> Cr-Commit-Position: refs/heads/main@{#1093907}
…ndles, a=testonly Automatic update from web-platform-tests FSA: Implement a cursor for SyncAccessHandles Specified at whatwg/fs#76 This only makes sense if the "at" option is optional, so that was later specified here: whatwg/fs#82 Fixed: 1394790 Change-Id: I51e7343d221c1b89dfb10e22434d9d213e152b2d Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4137091 Auto-Submit: Austin Sullivan <asully@chromium.org> Commit-Queue: Austin Sullivan <asully@chromium.org> Reviewed-by: Daseul Lee <dslee@chromium.org> Cr-Commit-Position: refs/heads/main@{#1093907} -- wpt-commits: ad88d36028e1564673f3d34b99862c1155da81ab wpt-pr: 37764
…ndles, a=testonly Automatic update from web-platform-tests FSA: Implement a cursor for SyncAccessHandles Specified at whatwg/fs#76 This only makes sense if the "at" option is optional, so that was later specified here: whatwg/fs#82 Fixed: 1394790 Change-Id: I51e7343d221c1b89dfb10e22434d9d213e152b2d Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4137091 Auto-Submit: Austin Sullivan <asully@chromium.org> Commit-Queue: Austin Sullivan <asully@chromium.org> Reviewed-by: Daseul Lee <dslee@chromium.org> Cr-Commit-Position: refs/heads/main@{#1093907} -- wpt-commits: ad88d36028e1564673f3d34b99862c1155da81ab wpt-pr: 37764
…ndles, a=testonly Automatic update from web-platform-tests FSA: Implement a cursor for SyncAccessHandles Specified at whatwg/fs#76 This only makes sense if the "at" option is optional, so that was later specified here: whatwg/fs#82 Fixed: 1394790 Change-Id: I51e7343d221c1b89dfb10e22434d9d213e152b2d Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4137091 Auto-Submit: Austin Sullivan <asully@chromium.org> Commit-Queue: Austin Sullivan <asully@chromium.org> Reviewed-by: Daseul Lee <dslee@chromium.org> Cr-Commit-Position: refs/heads/main@{#1093907} -- wpt-commits: ad88d36028e1564673f3d34b99862c1155da81ab wpt-pr: 37764
Adds cursor to FileSystemSyncAccessHandle, similar to the cursor for WritableFileStream. This means that supplying an 'at:' parameter for every read and write will not be needed.
(See WHATWG Working Mode: Changes for more details.)
Preview | Diff