-
Notifications
You must be signed in to change notification settings - Fork 63
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
Specify the error code for failures when reading a value from disk #430
Conversation
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.
Overall looks good, a few notes/suggestions.
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.
Looks great! Thank you for your patience.
Two last non-normative things:
- Add a note into the Revision History section, referencing the issue.
- Add yourself to the Acknowledgements section
(Normally I might do these as a follow-up PR but it's easiest if you do it - thank you!!!)
Thank you for the review! I've updated these two sections, please take a look. |
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.
Perfect!
Any word from Gecko and WebKit on this? Did it get discussion at TPAC this year?
Thank you! This wasn't discussed at TPAC. |
Ah, that's right - inspired by Gecko. I'll go ahead and merge. |
) SHA: 020487e Reason: push, by inexorabletash Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@@ -1866,6 +1866,13 @@ usage. | |||
not be found. | |||
</td> | |||
</tr> | |||
<tr> | |||
<td>{{NotReadableError}}</td> |
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.
Might be worth mentioning that this is considered a "permanent" loss or that the data is "irrecoverable"?
(Sorry for late review)
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.
Thanks, I'll update this in a follow-up PR.
Speaking of late reviews, I noticed that at least some errors are now StructuredSerialize-able. So making success/failure more explicit should be done. Follow-up PRs! |
Could you elaborate a bit on what you mean? Were |
Not until 2019. whatwg/webidl#732 Which is a long time ago, but this spec is pretty old. :) |
As a followup to crrev.com/c/5831673 and w3c/IndexedDB#430, this CL updates the name and message of the DOMException returned when unwrapping of large IndexedDB values fails due to the data files being missing from the disk. The intention is to convey the cause and unrecoverability of the error clearly to developers so that they can add appropriate error handling. Change-Id: Ieefc4a8b2e9d6bfe9823bcb88394e438db322162 Bug: 362123231 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5971136 Reviewed-by: Evan Stade <[email protected]> Commit-Queue: Abhishek Shanthkumar <[email protected]> Cr-Commit-Position: refs/heads/main@{#1377584}
This PR:
UnknownError
to convey that it should be used for transient reasons, per the Web IDL Standard.NotReadableError
from the Web IDL Standard to the list of possible exceptions.NotReadableError
to be returned when reading the value from the underlying storage fails in theobject-store-retrieval-operation
algorithms.Closes #423
The following tasks have been completed:
Modified Web platform tests (link to pull request)A WPT for this scenario does not seem feasible because the location of IndexedDB data on disk differs across browsers and platforms.Implementation commitment:
Preview | Diff