-
Notifications
You must be signed in to change notification settings - Fork 66
Validate exception ordering against implementations #11
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
IDBDatabaseNormal Methods
Schema Mutations
|
IDBObjectStoreNormal Methods
Schema Mutations
|
IDBIndex
|
IDBCursor
|
IDBTransaction
|
Great. At one point we should also get some tests on these things to make it simpler to implement and follow. :) |
@velmont - Yes please! Writing tests for these is a bit intimidating, since some cases involve upgrades, many involve async behavior (e.g. trying to use a transaction in a non-IDB callback but before the transaction has committed), etc. And, of course, this is all about combinations of the above. Ugh! I documented the Blink and Gecko behavior via code inspection, since that was easy. If anyone wants to help with writing testharness.js-based tests for these please let me know and I'll assist as best I can. I'm also happy to tweak the Chrome ordering; the cursor APIs are particularly funky, but until we have tests I don't want to change anything. |
Updated notes above for FF based on code inspection, following comments by @benturner #23 |
Need to update Chrome behavior descriptions following https://chromium.googlesource.com/chromium/src/+/dce205414aa1bde4125c3129fef24a8dc8ad32cc |
And tests there can be upstreamed to wpt |
Following a change yesterday in Chrome, FF and Cr match in all cases. \o/ But we still need tests - there are a bunch to upstream from blink (see WPT:... lines above) - mostly for "v2" stuff or where we have changed to align recently. |
Order of exceptions thrown from renaming object stores and indexes differs For IDBIndex, the name attribute’s setter runs these steps: For IDBObjectStore, the name attribute's setter runs these steps: The "if the is deleted..." exception is in different places for each of these, but should be in the same place. I'm implementing these in WebKit now and really don't want to follow the spec on this. Could we pick one or the other? |
@bevis-tseng and @pwnall - what do you think about making the changes @beidson proposes? i.e. swap the order in one of the two methods? |
I'm fine with either order. While building apps, I used to get thrown off by random errors while debugging my code, so I hope we can converge on some ordering. I can change Chrome to adopt any ordering Firefox and Safari would like to use. |
FYI. [1] http://searchfox.org/mozilla-central/rev/84075be5067b68dc6cb3b89f999645650e68c05b/dom/indexedDB/IDBObjectStore.cpp#2205-2219 |
WebKit now matches Gecko's ordering. |
Somehow I missed that comment. Yay! So far as I know WebKit/Gecko/Blink all match and those match the spec. If that's not the case please submit a web-platform-test case! |
The various "If .... throw ...." statements were left in order from previous iterations of the spec which asserted behavior but didn't define it as formal steps.
We need to verify that the steps match the implementations in the case of conflicts, and reorder if necessary. If implementations disagree, file implementation bugs as necessary.
The text was updated successfully, but these errors were encountered: