-
Notifications
You must be signed in to change notification settings - Fork 23
Seek target range #31
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
Comments
Yup, that's an error. Looks like the Chrome implementation was missing the |
Passing an invalid read or write offset should throw a TypeError This was pointed out in whatwg/fs#31 Bug: 1327741 Change-Id: Icd22cfefa49900a3f2e50c9baaeb766a2f1134fb
After thinking about this a bit more, we might want to consider what the other end of the target range looks like, as well. Using an Should we have language in the spec about what to do if the value is not valid for file operations on that OS? ( |
Passing an invalid read or write offset should throw a TypeError This was pointed out in whatwg/fs#31 Bug: 1327741 Change-Id: Icd22cfefa49900a3f2e50c9baaeb766a2f1134fb
Passing an invalid read or write offset should throw a TypeError This was pointed out in whatwg/fs#31 Bug: 1327741 Change-Id: Icd22cfefa49900a3f2e50c9baaeb766a2f1134fb
Passing an invalid read or write offset should throw a TypeError This was pointed out in whatwg/fs#31 Bug: 1327741 Change-Id: Icd22cfefa49900a3f2e50c9baaeb766a2f1134fb
Passing an invalid read or write offset should throw a TypeError This was pointed out in whatwg/fs#31 Bug: 1327741 Change-Id: Icd22cfefa49900a3f2e50c9baaeb766a2f1134fb Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3671807 Reviewed-by: Daniel Cheng <[email protected]> Commit-Queue: Austin Sullivan <[email protected]> Cr-Commit-Position: refs/heads/main@{#1010629}
Passing an invalid read or write offset should throw a TypeError This was pointed out in whatwg/fs#31 Bug: 1327741 Change-Id: Icd22cfefa49900a3f2e50c9baaeb766a2f1134fb Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3671807 Reviewed-by: Daniel Cheng <[email protected]> Commit-Queue: Austin Sullivan <[email protected]> Cr-Commit-Position: refs/heads/main@{#1010629}
The WPT has been updated to throw a |
Using a |
Thoughts on |
That could work as well, to some extent this depends on whether we expect web developers to branch on the exception type. If we don't, using the generic exception is preferred (that's I don't think we'd expect web developers to branch here. At least not based on this, but I could be mistaken. It seems to me that if the OS limit needs to be exposed there are better ways to do that, e.g., through a static getter. |
Good point! I'll update Chrome's implementation to make this a |
Follow-up to https://crrev.com/c/3671807. The idl enforces that an offset is an unsigned long long, but Chrome's underlying file implementation does not support anything more than a signed long long. In this case, we now throw a TypeError. See discussion on whatwg/fs#31 Also updates the error code in a case where we don't have enough quota to write to return an out-of-quota error. Bug: 1327741 Change-Id: I70ff8cea3810c3e61abdba7803f2ed117dd691d0 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3692211 Reviewed-by: Ayu Ishii <[email protected]> Commit-Queue: Ayu Ishii <[email protected]> Auto-Submit: Austin Sullivan <[email protected]> Cr-Commit-Position: refs/heads/main@{#1011435}
…Options.at, a=testonly Automatic update from web-platform-tests FSA: EnforceRange on FileSystemReadWriteOptions.at Passing an invalid read or write offset should throw a TypeError This was pointed out in whatwg/fs#31 Bug: 1327741 Change-Id: Icd22cfefa49900a3f2e50c9baaeb766a2f1134fb Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3671807 Reviewed-by: Daniel Cheng <[email protected]> Commit-Queue: Austin Sullivan <[email protected]> Cr-Commit-Position: refs/heads/main@{#1010629} -- wpt-commits: 1e43eadaa121e0577b8a78f97d608687ed160351 wpt-pr: 34240
#84) * throw TypeError if passed an unsupported offset Fixes #31 * properly [=throw=] Co-authored-by: Anne van Kesteren <[email protected]>
the webidl has
[[EnforceRange](https://webidl.spec.whatwg.org/#EnforceRange)] required [unsigned long long](https://webidl.spec.whatwg.org/#idl-unsigned-long-long) at;
However the WPT test of negative seek targets for SyncAccessHandles looks for dom NotSupportedError; the webidl spec says it should throw a TypeError. Likely this is simply a bug in the WPT test
The text was updated successfully, but these errors were encountered: