New issue
Advanced search Search tips

Issue 597303 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner: ----
Closed: Sep 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

IndexedDB: Align exception ordering w/ Firefox

Project Member Reported by jsb...@chromium.org, Mar 23 2016

Issue description

There are various cases where an IDB method may throw for multiple reasons. For example, when putting a value:

* transaction is read-only
* value can't be cloned
* key is invalid
* store was deleted
* transaction is inactive
* transaction has completed

Blink's impl adheres to the spec in that we throw in all of those cases, but if two cases apply we're not consistent with other browsers. Other browsers aren't consistent either, so this is not high priority, but it would be nice to fix.

Spec issue, tracking differences:

https://github.com/w3c/IndexedDB/issues/11

We might as well align with FF as we're pretty close and it's mostly just IDBCursor methods where we differ. 

The tricky part is not the fix - it's very simple code changes - it's writing the tests.
 

Comment 1 by jsb...@chromium.org, Mar 23 2016

Tests should be written testharness.js-style with the intent to upstream them to W3C's web-platform-tests

Cc: pwnall@chromium.org
Status: Fixed (was: Available)
Calling this fixed as of https://codereview.chromium.org/1897253003

More tests would be swell but I just can't even.
Project Member

Comment 3 by bugdroid1@chromium.org, Oct 17 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1998b62c571a941c26fdc8bd1cda5fe2193d21d4

commit 1998b62c571a941c26fdc8bd1cda5fe2193d21d4
Author: jsbell <jsbell@chromium.org>
Date: Mon Oct 17 21:39:59 2016

Indexed DB: More exception precedence tests

For methods previously lacking such tests, add tests that cover which
exception is thrown when a method is called with two invalid
conditions at the same time.

R=pwnall@chromium.org
BUG= 597303 

Review-Url: https://codereview.chromium.org/2415203002
Cr-Commit-Position: refs/heads/master@{#425785}

[add] https://crrev.com/1998b62c571a941c26fdc8bd1cda5fe2193d21d4/third_party/WebKit/LayoutTests/storage/indexeddb/idbcursor-advance-exception-order.html
[modify] https://crrev.com/1998b62c571a941c26fdc8bd1cda5fe2193d21d4/third_party/WebKit/LayoutTests/storage/indexeddb/idbcursor-continue-exception-order.html
[modify] https://crrev.com/1998b62c571a941c26fdc8bd1cda5fe2193d21d4/third_party/WebKit/LayoutTests/storage/indexeddb/idbcursor-delete-exception-order.html
[modify] https://crrev.com/1998b62c571a941c26fdc8bd1cda5fe2193d21d4/third_party/WebKit/LayoutTests/storage/indexeddb/idbcursor-update-exception-order.html
[modify] https://crrev.com/1998b62c571a941c26fdc8bd1cda5fe2193d21d4/third_party/WebKit/LayoutTests/storage/indexeddb/idbdatabase-createObjectStore-exception-order.html
[add] https://crrev.com/1998b62c571a941c26fdc8bd1cda5fe2193d21d4/third_party/WebKit/LayoutTests/storage/indexeddb/idbdatabase-deleteObjectStore-exception-order.html
[modify] https://crrev.com/1998b62c571a941c26fdc8bd1cda5fe2193d21d4/third_party/WebKit/LayoutTests/storage/indexeddb/idbdatabase-transaction-exception-order.html
[add] https://crrev.com/1998b62c571a941c26fdc8bd1cda5fe2193d21d4/third_party/WebKit/LayoutTests/storage/indexeddb/idbindex-query-exception-order.html
[add] https://crrev.com/1998b62c571a941c26fdc8bd1cda5fe2193d21d4/third_party/WebKit/LayoutTests/storage/indexeddb/idbobjectstore-add-put-exception-order.html
[add] https://crrev.com/1998b62c571a941c26fdc8bd1cda5fe2193d21d4/third_party/WebKit/LayoutTests/storage/indexeddb/idbobjectstore-clear-exception-order.html
[add] https://crrev.com/1998b62c571a941c26fdc8bd1cda5fe2193d21d4/third_party/WebKit/LayoutTests/storage/indexeddb/idbobjectstore-delete-exception-order.html
[add] https://crrev.com/1998b62c571a941c26fdc8bd1cda5fe2193d21d4/third_party/WebKit/LayoutTests/storage/indexeddb/idbobjectstore-deleteIndex-exception-order.html
[add] https://crrev.com/1998b62c571a941c26fdc8bd1cda5fe2193d21d4/third_party/WebKit/LayoutTests/storage/indexeddb/idbobjectstore-query-exception-order.html
[add] https://crrev.com/1998b62c571a941c26fdc8bd1cda5fe2193d21d4/third_party/WebKit/LayoutTests/storage/indexeddb/idbtransaction-objectStore-exception-order.html
[modify] https://crrev.com/1998b62c571a941c26fdc8bd1cda5fe2193d21d4/third_party/WebKit/LayoutTests/storage/indexeddb/resources/testharness-helpers.js

Sign in to add a comment