Title: [208386] trunk
Revision
208386
Author
[email protected]
Date
2016-11-04 11:02:02 -0700 (Fri, 04 Nov 2016)

Log Message

IndexedDB 2.0: Use IDB-specific exceptions in places where the generic exceptions are currently used.
https://bugs.webkit.org/show_bug.cgi?id=164406

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

* web-platform-tests/IndexedDB/idbindex-rename-errors-expected.txt:
* web-platform-tests/IndexedDB/idbobjectstore-rename-errors-expected.txt:

Source/WebCore:

No new tests (Covered by existing tests).

* Modules/indexeddb/IDBIndex.cpp:
(WebCore::IDBIndex::setName):

* Modules/indexeddb/IDBObjectStore.cpp:
(WebCore::IDBObjectStore::setName):

LayoutTests:

* storage/indexeddb/modern/index-rename-1-expected.txt:
* storage/indexeddb/modern/index-rename-1-private-expected.txt:
* storage/indexeddb/modern/objectstore-rename-1-expected.txt:
* storage/indexeddb/modern/objectstore-rename-1-private-expected.txt:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (208385 => 208386)


--- trunk/LayoutTests/ChangeLog	2016-11-04 17:26:32 UTC (rev 208385)
+++ trunk/LayoutTests/ChangeLog	2016-11-04 18:02:02 UTC (rev 208386)
@@ -1,3 +1,15 @@
+2016-11-04  Brady Eidson  <[email protected]>
+
+        IndexedDB 2.0: Use IDB-specific exceptions in places where the generic exceptions are currently used.
+        https://bugs.webkit.org/show_bug.cgi?id=164406
+
+        Reviewed by Alex Christensen.
+
+        * storage/indexeddb/modern/index-rename-1-expected.txt:
+        * storage/indexeddb/modern/index-rename-1-private-expected.txt:
+        * storage/indexeddb/modern/objectstore-rename-1-expected.txt:
+        * storage/indexeddb/modern/objectstore-rename-1-private-expected.txt:
+
 2016-11-04  Joanmarie Diggs  <[email protected]>
 
         AX: [ATK] Attempting to clear selection on ARIA listboxes results in crash

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (208385 => 208386)


--- trunk/LayoutTests/imported/w3c/ChangeLog	2016-11-04 17:26:32 UTC (rev 208385)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2016-11-04 18:02:02 UTC (rev 208386)
@@ -1,5 +1,15 @@
 2016-11-04  Brady Eidson  <[email protected]>
 
+        IndexedDB 2.0: Use IDB-specific exceptions in places where the generic exceptions are currently used.
+        https://bugs.webkit.org/show_bug.cgi?id=164406
+
+        Reviewed by Alex Christensen.
+
+        * web-platform-tests/IndexedDB/idbindex-rename-errors-expected.txt:
+        * web-platform-tests/IndexedDB/idbobjectstore-rename-errors-expected.txt:
+
+2016-11-04  Brady Eidson  <[email protected]>
+
         IndexedDB 2.0: Throw the correct exceptions during IDBObjectStore/IDBIndex renaming.
         https://bugs.webkit.org/show_bug.cgi?id=164405
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbindex-rename-errors-expected.txt (208385 => 208386)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbindex-rename-errors-expected.txt	2016-11-04 17:26:32 UTC (rev 208385)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbindex-rename-errors-expected.txt	2016-11-04 18:02:02 UTC (rev 208386)
@@ -2,7 +2,7 @@
 PASS IndexedDB deleted index rename throws 
 PASS IndexedDB index rename throws in a readonly transaction 
 PASS IndexedDB index rename throws in a readwrite transaction 
-FAIL IndexedDB index rename throws in an inactive transaction assert_throws: function "() => authorIndex.name = 'renamed_by_author'" threw object "TransactionInactiveError (DOM Exception 31): Failed set p..." that is not a DOMException TransactionInactiveError: property "code" is equal to 31, expected 0
-FAIL IndexedDB index rename to the name of another index throws assert_throws: function "() => index.name = 'by_title'" threw object "ConstraintError (DOM Exception 29): Failed set property '..." that is not a DOMException ConstraintError: property "code" is equal to 29, expected 0
+PASS IndexedDB index rename throws in an inactive transaction 
+PASS IndexedDB index rename to the name of another index throws 
 PASS IndexedDB index rename handles exceptions when stringifying names 
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbobjectstore-rename-errors-expected.txt (208385 => 208386)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbobjectstore-rename-errors-expected.txt	2016-11-04 17:26:32 UTC (rev 208385)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbobjectstore-rename-errors-expected.txt	2016-11-04 18:02:02 UTC (rev 208386)
@@ -2,7 +2,7 @@
 PASS IndexedDB deleted object store rename throws 
 PASS IndexedDB object store rename throws in a readonly transaction 
 PASS IndexedDB object store rename throws in a readwrite transaction 
-FAIL IndexedDB object store rename throws in an inactive transaction assert_throws: function "() => { bookStore.name = 'renamed_books'; }" threw object "TransactionInactiveError (DOM Exception 31): Failed set p..." that is not a DOMException TransactionInactiveError: property "code" is equal to 31, expected 0
-FAIL IndexedDB object store rename to the name of another store throws assert_throws: function "() => store.name = 'not_books'" threw object "ConstraintError (DOM Exception 29): Failed set property '..." that is not a DOMException ConstraintError: property "code" is equal to 29, expected 0
+PASS IndexedDB object store rename throws in an inactive transaction 
+PASS IndexedDB object store rename to the name of another store throws 
 PASS IndexedDB object store rename handles exceptions when stringifying names 
 

Modified: trunk/LayoutTests/storage/indexeddb/modern/index-rename-1-expected.txt (208385 => 208386)


--- trunk/LayoutTests/storage/indexeddb/modern/index-rename-1-expected.txt	2016-11-04 17:26:32 UTC (rev 208385)
+++ trunk/LayoutTests/storage/indexeddb/modern/index-rename-1-expected.txt	2016-11-04 18:02:02 UTC (rev 208386)
@@ -10,7 +10,7 @@
 Initial upgrade needed: Old version - 0 New version - 1
 Failed to rename deleted index: InvalidStateError (DOM Exception 11): Failed set property 'name' on 'IDBIndex': The index has been deleted.
 Initial index name: NewIndex
-Caught exception renaming index to the name of another existing index: ConstraintError (DOM Exception 29): Failed set property 'name' on 'IDBIndex': The owning object store already has an index named 'ExistingIndex'.
+Caught exception renaming index to the name of another existing index: ConstraintError (DOM IDBDatabase Exception): Failed set property 'name' on 'IDBIndex': The owning object store already has an index named 'ExistingIndex'.
 Renamed this index to the same name it already has, it's name is now: NewIndex
 Renamed index name: RenamedIndex
 Current index name in a new transaction: RenamedIndex

Modified: trunk/LayoutTests/storage/indexeddb/modern/index-rename-1-private-expected.txt (208385 => 208386)


--- trunk/LayoutTests/storage/indexeddb/modern/index-rename-1-private-expected.txt	2016-11-04 17:26:32 UTC (rev 208385)
+++ trunk/LayoutTests/storage/indexeddb/modern/index-rename-1-private-expected.txt	2016-11-04 18:02:02 UTC (rev 208386)
@@ -10,7 +10,7 @@
 Initial upgrade needed: Old version - 0 New version - 1
 Failed to rename deleted index: InvalidStateError (DOM Exception 11): Failed set property 'name' on 'IDBIndex': The index has been deleted.
 Initial index name: NewIndex
-Caught exception renaming index to the name of another existing index: ConstraintError (DOM Exception 29): Failed set property 'name' on 'IDBIndex': The owning object store already has an index named 'ExistingIndex'.
+Caught exception renaming index to the name of another existing index: ConstraintError (DOM IDBDatabase Exception): Failed set property 'name' on 'IDBIndex': The owning object store already has an index named 'ExistingIndex'.
 Renamed this index to the same name it already has, it's name is now: NewIndex
 Renamed index name: RenamedIndex
 Current index name in a new transaction: RenamedIndex

Modified: trunk/LayoutTests/storage/indexeddb/modern/objectstore-rename-1-expected.txt (208385 => 208386)


--- trunk/LayoutTests/storage/indexeddb/modern/objectstore-rename-1-expected.txt	2016-11-04 17:26:32 UTC (rev 208385)
+++ trunk/LayoutTests/storage/indexeddb/modern/objectstore-rename-1-expected.txt	2016-11-04 18:02:02 UTC (rev 208386)
@@ -9,7 +9,7 @@
 indexedDB.open(dbname)
 Initial upgrade needed: Old version - 0 New version - 1
 Initial objectStore name: TestObjectStore
-Caught exception renaming object store to the name of another existing object store: ConstraintError (DOM Exception 29): Failed set property 'name' on 'IDBObjectStore': The database already has an object store named 'ExistingObjectStore'.
+Caught exception renaming object store to the name of another existing object store: ConstraintError (DOM IDBDatabase Exception): Failed set property 'name' on 'IDBObjectStore': The database already has an object store named 'ExistingObjectStore'.
 Renamed objectStore name: RenamedObjectStore
 Current objectStore name in a new transaction: RenamedObjectStore
 Caught exception renaming object store outside of a version change transaction: InvalidStateError (DOM Exception 11): Failed set property 'name' on 'IDBObjectStore': The object store's transaction is not a version change transaction.

Modified: trunk/LayoutTests/storage/indexeddb/modern/objectstore-rename-1-private-expected.txt (208385 => 208386)


--- trunk/LayoutTests/storage/indexeddb/modern/objectstore-rename-1-private-expected.txt	2016-11-04 17:26:32 UTC (rev 208385)
+++ trunk/LayoutTests/storage/indexeddb/modern/objectstore-rename-1-private-expected.txt	2016-11-04 18:02:02 UTC (rev 208386)
@@ -9,7 +9,7 @@
 indexedDB.open(dbname)
 Initial upgrade needed: Old version - 0 New version - 1
 Initial objectStore name: TestObjectStore
-Caught exception renaming object store to the name of another existing object store: ConstraintError (DOM Exception 29): Failed set property 'name' on 'IDBObjectStore': The database already has an object store named 'ExistingObjectStore'.
+Caught exception renaming object store to the name of another existing object store: ConstraintError (DOM IDBDatabase Exception): Failed set property 'name' on 'IDBObjectStore': The database already has an object store named 'ExistingObjectStore'.
 Renamed objectStore name: RenamedObjectStore
 Current objectStore name in a new transaction: RenamedObjectStore
 Caught exception renaming object store outside of a version change transaction: InvalidStateError (DOM Exception 11): Failed set property 'name' on 'IDBObjectStore': The object store's transaction is not a version change transaction.

Modified: trunk/Source/WebCore/ChangeLog (208385 => 208386)


--- trunk/Source/WebCore/ChangeLog	2016-11-04 17:26:32 UTC (rev 208385)
+++ trunk/Source/WebCore/ChangeLog	2016-11-04 18:02:02 UTC (rev 208386)
@@ -1,3 +1,18 @@
+2016-11-04  Brady Eidson  <[email protected]>
+
+        IndexedDB 2.0: Use IDB-specific exceptions in places where the generic exceptions are currently used.
+        https://bugs.webkit.org/show_bug.cgi?id=164406
+
+        Reviewed by Alex Christensen.
+
+        No new tests (Covered by existing tests).
+
+        * Modules/indexeddb/IDBIndex.cpp:
+        (WebCore::IDBIndex::setName):
+
+        * Modules/indexeddb/IDBObjectStore.cpp:
+        (WebCore::IDBObjectStore::setName):
+
 2016-11-04  Joanmarie Diggs  <[email protected]>
 
         AX: [ATK] Attempting to clear selection on ARIA listboxes results in crash

Modified: trunk/Source/WebCore/Modules/indexeddb/IDBIndex.cpp (208385 => 208386)


--- trunk/Source/WebCore/Modules/indexeddb/IDBIndex.cpp	2016-11-04 17:26:32 UTC (rev 208385)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBIndex.cpp	2016-11-04 18:02:02 UTC (rev 208386)
@@ -93,13 +93,13 @@
         return Exception { INVALID_STATE_ERR, ASCIILiteral("Failed set property 'name' on 'IDBIndex': The index's transaction is not a version change transaction.") };
 
     if (!m_objectStore.transaction().isActive())
-        return Exception { TransactionInactiveError, ASCIILiteral("Failed set property 'name' on 'IDBIndex': The index's transaction is not active.") };
+        return Exception { IDBDatabaseException::TransactionInactiveError, ASCIILiteral("Failed set property 'name' on 'IDBIndex': The index's transaction is not active.") };
 
     if (m_info.name() == name)
         return { };
 
     if (m_objectStore.info().hasIndex(name))
-        return Exception { ConstraintError, makeString("Failed set property 'name' on 'IDBIndex': The owning object store already has an index named '", name, "'.") };
+        return Exception { IDBDatabaseException::ConstraintError, makeString("Failed set property 'name' on 'IDBIndex': The owning object store already has an index named '", name, "'.") };
 
     m_objectStore.transaction().database().renameIndex(*this, name);
     m_info.rename(name);

Modified: trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp (208385 => 208386)


--- trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp	2016-11-04 17:26:32 UTC (rev 208385)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp	2016-11-04 18:02:02 UTC (rev 208386)
@@ -106,13 +106,13 @@
         return Exception { INVALID_STATE_ERR, ASCIILiteral("Failed set property 'name' on 'IDBObjectStore': The object store's transaction is not a version change transaction.") };
 
     if (!m_transaction->isActive())
-        return Exception { TransactionInactiveError, ASCIILiteral("Failed set property 'name' on 'IDBObjectStore': The object store's transaction is not active.") };
+        return Exception { IDBDatabaseException::TransactionInactiveError, ASCIILiteral("Failed set property 'name' on 'IDBObjectStore': The object store's transaction is not active.") };
 
     if (m_info.name() == name)
         return { };
 
     if (m_transaction->database().info().hasObjectStore(name))
-        return Exception { ConstraintError, makeString("Failed set property 'name' on 'IDBObjectStore': The database already has an object store named '", name, "'.") };
+        return Exception { IDBDatabaseException::ConstraintError, makeString("Failed set property 'name' on 'IDBObjectStore': The database already has an object store named '", name, "'.") };
 
     m_transaction->database().renameObjectStore(*this, name);
     m_info.rename(name);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to