WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch
bug-88459-20120607095935.patch (text/plain), 45.34 KB, created by
Alec Flett
on 2012-06-07 09:59:35 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Alec Flett
Created:
2012-06-07 09:59:35 PDT
Size:
45.34 KB
patch
obsolete
>Subversion Revision: 119712 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 2bb82906c1f1666771c79c06634d52b3adfce995..18487b60feb53eda56c31d9219e8ed212e589520 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,57 @@ >+2012-06-06 Alec Flett <alecflett@chromium.org> >+ >+ IndexedDB: Error codes, phase one >+ https://bugs.webkit.org/show_bug.cgi?id=88459 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ This phase gets rid of the now-deprecated NOT_ALLOWED_ERR and >+ NON_TRANSIENT_ERR from earlier versions of the spec, and >+ normalizes the place where TypeError should be thrown so that it's >+ easier to update when the bindings change. >+ >+ No new tests: existing tests cover these changes and have been updated. >+ >+ * Modules/indexeddb/IDBCursor.cpp: >+ (WebCore::IDBCursor::advance): >+ (WebCore::IDBCursor::continueFunction): >+ (WebCore::IDBCursor::stringToDirection): >+ (WebCore::IDBCursor::directionToString): >+ * Modules/indexeddb/IDBCursorBackendImpl.cpp: >+ (WebCore::IDBCursorBackendImpl::update): >+ (WebCore::IDBCursorBackendImpl::deleteFunction): >+ * Modules/indexeddb/IDBDatabase.cpp: >+ (WebCore::IDBDatabase::createObjectStore): >+ (WebCore::IDBDatabase::deleteObjectStore): >+ (WebCore::IDBDatabase::setVersion): >+ (WebCore::IDBDatabase::transaction): >+ * Modules/indexeddb/IDBDatabaseBackendImpl.cpp: >+ (WebCore::IDBDatabaseBackendImpl::createObjectStore): >+ (WebCore::IDBDatabaseBackendImpl::deleteObjectStore): >+ (WebCore::IDBDatabaseBackendImpl::setVersion): >+ * Modules/indexeddb/IDBDatabaseException.cpp: >+ (WebCore): >+ * Modules/indexeddb/IDBDatabaseException.h: >+ * Modules/indexeddb/IDBDatabaseException.idl: >+ * Modules/indexeddb/IDBFactory.cpp: >+ (WebCore::IDBFactory::open): >+ (WebCore::IDBFactory::deleteDatabase): >+ * Modules/indexeddb/IDBObjectStore.cpp: >+ (WebCore::IDBObjectStore::index): >+ * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp: >+ (WebCore::IDBObjectStoreBackendImpl::createIndex): >+ (WebCore::IDBObjectStoreBackendImpl::deleteIndex): >+ * Modules/indexeddb/IDBRequest.cpp: >+ (WebCore::IDBRequest::result): >+ (WebCore::IDBRequest::errorCode): >+ (WebCore::IDBRequest::webkitErrorMessage): >+ * Modules/indexeddb/IDBTransaction.cpp: >+ (WebCore::IDBTransaction::objectStore): >+ (WebCore::IDBTransaction::stringToMode): >+ (WebCore::IDBTransaction::modeToString): >+ * Modules/indexeddb/IDBTransactionBackendImpl.cpp: >+ (WebCore::IDBTransactionBackendImpl::objectStore): >+ > 2012-06-07 Sheriff Bot <webkit.review.bot@gmail.com> > > Unreviewed, rolling out r119694. >diff --git a/Source/WebCore/Modules/indexeddb/IDBCursor.cpp b/Source/WebCore/Modules/indexeddb/IDBCursor.cpp >index de4ec08fa23af9d94a87c6a814e43d2a7d4003e9..38dba4955ab2a82970b7102795bcc0645b37d296 100644 >--- a/Source/WebCore/Modules/indexeddb/IDBCursor.cpp >+++ b/Source/WebCore/Modules/indexeddb/IDBCursor.cpp >@@ -158,13 +158,13 @@ void IDBCursor::advance(unsigned long count, ExceptionCode& ec) > } > > if (!count) { >- // FIXME: should be a JavaScript TypeError. See https://bugs.webkit.org/show_bug.cgi?id=85513 >- ec = IDBDatabaseException::IDB_TYPE_MISMATCH_ERR; >+ ec = IDBDatabaseException::IDB_TYPE_ERR; > return; > } > > if (!m_request->resetReadyState(m_transaction.get())) { >- ec = IDBDatabaseException::NOT_ALLOWED_ERR; >+ // FIXME: Can this happen? should this be an ASSERT? >+ ec = IDBDatabaseException::IDB_INVALID_STATE_ERR; > return; > } > m_request->setCursor(this); >@@ -197,7 +197,8 @@ void IDBCursor::continueFunction(PassRefPtr<IDBKey> key, ExceptionCode& ec) > m_gotValue = false; > m_backend->continueFunction(key, m_request, ec); > } else >- ec = IDBDatabaseException::NOT_ALLOWED_ERR; >+ // FIXME: Can this happen? should this be an ASSERT? >+ ec = IDBDatabaseException::IDB_INVALID_STATE_ERR; > } > > PassRefPtr<IDBRequest> IDBCursor::deleteFunction(ScriptExecutionContext* context, ExceptionCode& ec) >@@ -247,8 +248,7 @@ unsigned short IDBCursor::stringToDirection(const String& directionString, Excep > if (directionString == IDBCursor::directionPrevUnique()) > return IDBCursor::PREV_NO_DUPLICATE; > >- // FIXME: should be a JavaScript TypeError. See https://bugs.webkit.org/show_bug.cgi?id=85513 >- ec = IDBDatabaseException::NON_TRANSIENT_ERR; >+ ec = IDBDatabaseException::IDB_TYPE_ERR; > return 0; > } > >@@ -268,7 +268,7 @@ const AtomicString& IDBCursor::directionToString(unsigned short direction, Excep > return IDBCursor::directionPrevUnique(); > > default: >- ec = IDBDatabaseException::NON_TRANSIENT_ERR; >+ ec = IDBDatabaseException::IDB_TYPE_ERR; > return IDBCursor::directionNext(); > } > } >diff --git a/Source/WebCore/Modules/indexeddb/IDBCursorBackendImpl.cpp b/Source/WebCore/Modules/indexeddb/IDBCursorBackendImpl.cpp >index 54803b54fd8e540c473f414fe4831a092203b672..e1d71da2214d6df66dc05cc6a340e237b6e307d1 100644 >--- a/Source/WebCore/Modules/indexeddb/IDBCursorBackendImpl.cpp >+++ b/Source/WebCore/Modules/indexeddb/IDBCursorBackendImpl.cpp >@@ -93,7 +93,7 @@ void IDBCursorBackendImpl::update(PassRefPtr<SerializedScriptValue> value, PassR > { > IDB_TRACE("IDBCursorBackendImpl::update"); > if (!m_cursor || m_cursorType == IndexKeyCursor) { >- ec = IDBDatabaseException::NOT_ALLOWED_ERR; >+ ec = IDBDatabaseException::IDB_INVALID_STATE_ERR; > return; > } > >@@ -164,7 +164,7 @@ void IDBCursorBackendImpl::deleteFunction(PassRefPtr<IDBCallbacks> prpCallbacks, > { > IDB_TRACE("IDBCursorBackendImpl::delete"); > if (!m_cursor || m_cursorType == IndexKeyCursor) { >- ec = IDBDatabaseException::NOT_ALLOWED_ERR; >+ ec = IDBDatabaseException::IDB_INVALID_STATE_ERR; > return; > } > >diff --git a/Source/WebCore/Modules/indexeddb/IDBDatabase.cpp b/Source/WebCore/Modules/indexeddb/IDBDatabase.cpp >index e1f44cd5060a5c5801cda0f4ef92a50a02ce7262..2f2b72a3ba88fffa203ebfe58168c7f73cab91e0 100644 >--- a/Source/WebCore/Modules/indexeddb/IDBDatabase.cpp >+++ b/Source/WebCore/Modules/indexeddb/IDBDatabase.cpp >@@ -88,7 +88,7 @@ void IDBDatabase::clearVersionChangeTransaction(IDBTransaction* transaction) > PassRefPtr<IDBObjectStore> IDBDatabase::createObjectStore(const String& name, const Dictionary& options, ExceptionCode& ec) > { > if (!m_versionChangeTransaction) { >- ec = IDBDatabaseException::NOT_ALLOWED_ERR; >+ ec = IDBDatabaseException::IDB_INVALID_STATE_ERR; > return 0; > } > >@@ -130,7 +130,7 @@ PassRefPtr<IDBObjectStore> IDBDatabase::createObjectStore(const String& name, co > void IDBDatabase::deleteObjectStore(const String& name, ExceptionCode& ec) > { > if (!m_versionChangeTransaction) { >- ec = IDBDatabaseException::NOT_ALLOWED_ERR; >+ ec = IDBDatabaseException::IDB_INVALID_STATE_ERR; > return; > } > >@@ -141,7 +141,7 @@ void IDBDatabase::deleteObjectStore(const String& name, ExceptionCode& ec) > PassRefPtr<IDBVersionChangeRequest> IDBDatabase::setVersion(ScriptExecutionContext* context, const String& version, ExceptionCode& ec) > { > if (version.isNull()) { >- ec = IDBDatabaseException::NON_TRANSIENT_ERR; >+ ec = IDBDatabaseException::IDB_TYPE_ERR; > return 0; > } > >@@ -163,7 +163,7 @@ PassRefPtr<IDBTransaction> IDBDatabase::transaction(ScriptExecutionContext* cont > return 0; > > if (m_closePending) { >- ec = IDBDatabaseException::NOT_ALLOWED_ERR; >+ ec = IDBDatabaseException::IDB_INVALID_STATE_ERR; > return 0; > } > >diff --git a/Source/WebCore/Modules/indexeddb/IDBDatabaseBackendImpl.cpp b/Source/WebCore/Modules/indexeddb/IDBDatabaseBackendImpl.cpp >index 3b29731583929613d1a22fe92f8849d83282b16a..9980c02a5d3561143b69a25ad4fa2ceb32259077 100644 >--- a/Source/WebCore/Modules/indexeddb/IDBDatabaseBackendImpl.cpp >+++ b/Source/WebCore/Modules/indexeddb/IDBDatabaseBackendImpl.cpp >@@ -146,7 +146,6 @@ PassRefPtr<DOMStringList> IDBDatabaseBackendImpl::objectStoreNames() const > PassRefPtr<IDBObjectStoreBackendInterface> IDBDatabaseBackendImpl::createObjectStore(const String& name, const IDBKeyPath& keyPath, bool autoIncrement, IDBTransactionBackendInterface* transactionPtr, ExceptionCode& ec) > { > ASSERT(transactionPtr->mode() == IDBTransaction::VERSION_CHANGE); >- > if (m_objectStores.contains(name)) { > ec = IDBDatabaseException::CONSTRAINT_ERR; > return 0; >@@ -159,7 +158,7 @@ PassRefPtr<IDBObjectStoreBackendInterface> IDBDatabaseBackendImpl::createObjectS > RefPtr<IDBTransactionBackendInterface> transaction = transactionPtr; > if (!transaction->scheduleTask(createCallbackTask(&IDBDatabaseBackendImpl::createObjectStoreInternal, database, objectStore, transaction), > createCallbackTask(&IDBDatabaseBackendImpl::removeObjectStoreFromMap, database, objectStore))) { >- ec = IDBDatabaseException::NOT_ALLOWED_ERR; >+ ec = IDBDatabaseException::TRANSACTION_INACTIVE_ERR; > return 0; > } > >@@ -187,6 +186,7 @@ PassRefPtr<IDBObjectStoreBackendInterface> IDBDatabaseBackendImpl::objectStore(c > > void IDBDatabaseBackendImpl::deleteObjectStore(const String& name, IDBTransactionBackendInterface* transactionPtr, ExceptionCode& ec) > { >+ ASSERT(transactionPtr->mode() == IDBTransaction::VERSION_CHANGE); > RefPtr<IDBObjectStoreBackendImpl> objectStore = m_objectStores.get(name); > if (!objectStore) { > ec = IDBDatabaseException::IDB_NOT_FOUND_ERR; >@@ -196,7 +196,7 @@ void IDBDatabaseBackendImpl::deleteObjectStore(const String& name, IDBTransactio > RefPtr<IDBTransactionBackendInterface> transaction = transactionPtr; > if (!transaction->scheduleTask(createCallbackTask(&IDBDatabaseBackendImpl::deleteObjectStoreInternal, database, objectStore, transaction), > createCallbackTask(&IDBDatabaseBackendImpl::addObjectStoreToMap, database, objectStore))) { >- ec = IDBDatabaseException::NOT_ALLOWED_ERR; >+ ec = IDBDatabaseException::TRANSACTION_INACTIVE_ERR; > return; > } > m_objectStores.remove(name); >@@ -240,7 +240,7 @@ void IDBDatabaseBackendImpl::setVersion(const String& version, PassRefPtr<IDBCal > RefPtr<IDBTransactionBackendInterface> transaction = IDBTransactionBackendImpl::create(objectStoreNames.get(), IDBTransaction::VERSION_CHANGE, this); > if (!transaction->scheduleTask(createCallbackTask(&IDBDatabaseBackendImpl::setVersionInternal, database, version, callbacks, transaction), > createCallbackTask(&IDBDatabaseBackendImpl::resetVersion, database, m_version))) { >- ec = IDBDatabaseException::NOT_ALLOWED_ERR; >+ ec = IDBDatabaseException::TRANSACTION_INACTIVE_ERR; > } > } > >diff --git a/Source/WebCore/Modules/indexeddb/IDBDatabaseException.cpp b/Source/WebCore/Modules/indexeddb/IDBDatabaseException.cpp >index e52c3291d7c3b1d374fc4c3da0e163f440a7bcd7..982819a01638fe9bc1d7255cc82d24f1e7ac519f 100644 >--- a/Source/WebCore/Modules/indexeddb/IDBDatabaseException.cpp >+++ b/Source/WebCore/Modules/indexeddb/IDBDatabaseException.cpp >@@ -63,7 +63,7 @@ static const struct IDBDatabaseExceptionNameDescription { > { "SyntaxError", "The keypath argument contains an invalid key path.", SYNTAX_ERR }, > { "DataCloneError", "The data being stored could not be cloned by the internal structured cloning algorithm.", DATA_CLONE_ERR }, > // FIXME: should be a JavaScript TypeError. See https://bugs.webkit.org/show_bug.cgi?id=85513 >- { "TypeMismatchError", "This should be a TypeError", TYPE_MISMATCH_ERR }, >+ { "TypeError", "This should be a TypeError", 0 }, > { "NotSupportedError", "Cannot use multiEntry indexed with an array keypath", NOT_SUPPORTED_ERR }, > }; > >diff --git a/Source/WebCore/Modules/indexeddb/IDBDatabaseException.h b/Source/WebCore/Modules/indexeddb/IDBDatabaseException.h >index 35123d563b68e56db991666bc6ff93a961a69cb4..1a179b908320d832d2c58eba9a610c46eac6922e 100644 >--- a/Source/WebCore/Modules/indexeddb/IDBDatabaseException.h >+++ b/Source/WebCore/Modules/indexeddb/IDBDatabaseException.h >@@ -45,11 +45,11 @@ public: > enum IDBDatabaseExceptionCode { > NO_ERR = IDBDatabaseExceptionOffset, > UNKNOWN_ERR, >- NON_TRANSIENT_ERR, // FIXME: No longer in the spec >+ LEGACY_NON_TRANSIENT_ERR, // FIXME: Placeholder, not in spec. > LEGACY_NOT_FOUND_ERR, // FIXME: Placeholder. > CONSTRAINT_ERR, > DATA_ERR, >- NOT_ALLOWED_ERR, // FIXME: No longer in the spec >+ LEGACY_NOT_ALLOWED_ERR, // FIXME: Placeholder, not in spec. > TRANSACTION_INACTIVE_ERR, > LEGACY_ABORT_ERR, // FIXME: Placeholder. > READ_ONLY_ERR, >@@ -65,7 +65,7 @@ public: > IDB_QUOTA_EXCEEDED_ERR, > IDB_SYNTAX_ERR, > IDB_DATA_CLONE_ERR, >- IDB_TYPE_MISMATCH_ERR, >+ IDB_TYPE_ERR, // FIXME: Placeholder until bindings have been updated to throw a JS TypeError. See https://bugs.webkit.org/show_bug.cgi?id=85513 > IDB_NOT_SUPPORTED_ERR, > }; > >diff --git a/Source/WebCore/Modules/indexeddb/IDBDatabaseException.idl b/Source/WebCore/Modules/indexeddb/IDBDatabaseException.idl >index 67d811c3eaf320b44618c6ec04d4e56861924b3b..984cab922bd66ca7f4e276f6b21441c9e2e63ad3 100644 >--- a/Source/WebCore/Modules/indexeddb/IDBDatabaseException.idl >+++ b/Source/WebCore/Modules/indexeddb/IDBDatabaseException.idl >@@ -49,6 +49,10 @@ module storage { > const unsigned short READ_ONLY_ERR = 9; > const unsigned short VER_ERR = 12; > >+ // FIXME: Placeholder until bindings have been updated to throw a JS TypeError. >+ // See https://bugs.webkit.org/show_bug.cgi?id=85513 >+ const unsigned short TYPE_ERR = 21; >+ > const unsigned short NOT_FOUND_ERR = 8; > const unsigned short ABORT_ERR = 20; > const unsigned short TIMEOUT_ERR = 23; >diff --git a/Source/WebCore/Modules/indexeddb/IDBFactory.cpp b/Source/WebCore/Modules/indexeddb/IDBFactory.cpp >index 42b4fee9ba8b2767bef27e5195bcf83dd7e24c28..18116f5a3ea9785d1b69d828af3adcde1b6fc6e9 100644 >--- a/Source/WebCore/Modules/indexeddb/IDBFactory.cpp >+++ b/Source/WebCore/Modules/indexeddb/IDBFactory.cpp >@@ -85,7 +85,7 @@ PassRefPtr<IDBRequest> IDBFactory::open(ScriptExecutionContext* context, const S > ASSERT(context->isDocument() || context->isWorkerContext()); > > if (name.isNull()) { >- ec = IDBDatabaseException::NON_TRANSIENT_ERR; >+ ec = IDBDatabaseException::IDB_TYPE_ERR; > return 0; > } > if (context->isDocument()) { >@@ -118,7 +118,7 @@ PassRefPtr<IDBVersionChangeRequest> IDBFactory::deleteDatabase(ScriptExecutionCo > return 0; > > if (name.isNull()) { >- ec = IDBDatabaseException::NON_TRANSIENT_ERR; >+ ec = IDBDatabaseException::IDB_TYPE_ERR; > return 0; > } > >diff --git a/Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp b/Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp >index 6fd7d5d63bd10e4ac9aa9ac03316239d7ffad247..109a7515f87583a276a5222ec0bebb9cb49631f0 100644 >--- a/Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp >+++ b/Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp >@@ -255,7 +255,7 @@ PassRefPtr<IDBIndex> IDBObjectStore::index(const String& name, ExceptionCode& ec > { > IDB_TRACE("IDBObjectStore::index"); > if (m_transaction->isFinished()) { >- ec = IDBDatabaseException::NOT_ALLOWED_ERR; >+ ec = IDBDatabaseException::IDB_INVALID_STATE_ERR; > return 0; > } > >diff --git a/Source/WebCore/Modules/indexeddb/IDBObjectStoreBackendImpl.cpp b/Source/WebCore/Modules/indexeddb/IDBObjectStoreBackendImpl.cpp >index ac4388701f9744491b7db1eb951b895881de2e77..1b3963060134962810cc88407119c0796e1efc4d 100644 >--- a/Source/WebCore/Modules/indexeddb/IDBObjectStoreBackendImpl.cpp >+++ b/Source/WebCore/Modules/indexeddb/IDBObjectStoreBackendImpl.cpp >@@ -483,7 +483,7 @@ bool IDBObjectStoreBackendImpl::populateIndex(IDBBackingStore& backingStore, int > PassRefPtr<IDBIndexBackendInterface> IDBObjectStoreBackendImpl::createIndex(const String& name, const IDBKeyPath& keyPath, bool unique, bool multiEntry, IDBTransactionBackendInterface* transaction, ExceptionCode& ec) > { > if (name.isNull()) { >- ec = IDBDatabaseException::NON_TRANSIENT_ERR; >+ ec = IDBDatabaseException::IDB_TYPE_ERR; > return 0; > } > if (m_indexes.contains(name)) { >@@ -491,7 +491,7 @@ PassRefPtr<IDBIndexBackendInterface> IDBObjectStoreBackendImpl::createIndex(cons > return 0; > } > if (transaction->mode() != IDBTransaction::VERSION_CHANGE) { >- ec = IDBDatabaseException::NOT_ALLOWED_ERR; >+ ec = IDBDatabaseException::IDB_INVALID_STATE_ERR; > return 0; > } > >@@ -544,7 +544,7 @@ PassRefPtr<IDBIndexBackendInterface> IDBObjectStoreBackendImpl::index(const Stri > void IDBObjectStoreBackendImpl::deleteIndex(const String& name, IDBTransactionBackendInterface* transaction, ExceptionCode& ec) > { > if (transaction->mode() != IDBTransaction::VERSION_CHANGE) { >- ec = IDBDatabaseException::NOT_ALLOWED_ERR; >+ ec = IDBDatabaseException::IDB_INVALID_STATE_ERR; > return; > } > >diff --git a/Source/WebCore/Modules/indexeddb/IDBRequest.cpp b/Source/WebCore/Modules/indexeddb/IDBRequest.cpp >index a316f8d4db2e5e71a544f59028b55b990e98c972..5db11490e4dfd9e6e7c5ebc1f8931f90c43182b1 100644 >--- a/Source/WebCore/Modules/indexeddb/IDBRequest.cpp >+++ b/Source/WebCore/Modules/indexeddb/IDBRequest.cpp >@@ -79,7 +79,7 @@ IDBRequest::~IDBRequest() > PassRefPtr<IDBAny> IDBRequest::result(ExceptionCode& ec) const > { > if (m_readyState != DONE) { >- ec = IDBDatabaseException::NOT_ALLOWED_ERR; >+ ec = IDBDatabaseException::IDB_INVALID_STATE_ERR; > return 0; > } > return m_result; >@@ -97,7 +97,7 @@ PassRefPtr<DOMError> IDBRequest::error(ExceptionCode& ec) const > unsigned short IDBRequest::errorCode(ExceptionCode& ec) const > { > if (m_readyState != DONE) { >- ec = IDBDatabaseException::NOT_ALLOWED_ERR; >+ ec = IDBDatabaseException::IDB_INVALID_STATE_ERR; > return 0; > } > return m_errorCode; >@@ -106,7 +106,7 @@ unsigned short IDBRequest::errorCode(ExceptionCode& ec) const > String IDBRequest::webkitErrorMessage(ExceptionCode& ec) const > { > if (m_readyState != DONE) { >- ec = IDBDatabaseException::NOT_ALLOWED_ERR; >+ ec = IDBDatabaseException::IDB_INVALID_STATE_ERR; > return String(); > } > return m_errorMessage; >diff --git a/Source/WebCore/Modules/indexeddb/IDBTransaction.cpp b/Source/WebCore/Modules/indexeddb/IDBTransaction.cpp >index f5c744b15a772c75b0372eec4c20c923e2fda8c2..a3bc62caf86859e34186e4e31e665965b15c6e37 100644 >--- a/Source/WebCore/Modules/indexeddb/IDBTransaction.cpp >+++ b/Source/WebCore/Modules/indexeddb/IDBTransaction.cpp >@@ -141,7 +141,7 @@ void IDBTransaction::setError(PassRefPtr<DOMError> error) > PassRefPtr<IDBObjectStore> IDBTransaction::objectStore(const String& name, ExceptionCode& ec) > { > if (m_transactionFinished) { >- ec = IDBDatabaseException::NOT_ALLOWED_ERR; >+ ec = IDBDatabaseException::IDB_INVALID_STATE_ERR; > return 0; > } > >@@ -268,7 +268,7 @@ unsigned short IDBTransaction::stringToMode(const String& modeString, ExceptionC > return IDBTransaction::READ_ONLY; > if (modeString == IDBTransaction::modeReadWrite()) > return IDBTransaction::READ_WRITE; >- ec = IDBDatabaseException::NOT_ALLOWED_ERR; >+ ec = IDBDatabaseException::IDB_TYPE_ERR; > return 0; > } > >@@ -288,7 +288,7 @@ const AtomicString& IDBTransaction::modeToString(unsigned short mode, ExceptionC > break; > > default: >- ec = IDBDatabaseException::NON_TRANSIENT_ERR; >+ ec = IDBDatabaseException::IDB_TYPE_ERR; > return IDBTransaction::modeReadOnly(); > } > } >diff --git a/Source/WebCore/Modules/indexeddb/IDBTransactionBackendImpl.cpp b/Source/WebCore/Modules/indexeddb/IDBTransactionBackendImpl.cpp >index d910c6c2c0d9bcaf984b3ce4e5999d0db0657647..b1cad7fd1749d6818322b7351021202606501be8 100644 >--- a/Source/WebCore/Modules/indexeddb/IDBTransactionBackendImpl.cpp >+++ b/Source/WebCore/Modules/indexeddb/IDBTransactionBackendImpl.cpp >@@ -66,7 +66,7 @@ IDBTransactionBackendImpl::~IDBTransactionBackendImpl() > PassRefPtr<IDBObjectStoreBackendInterface> IDBTransactionBackendImpl::objectStore(const String& name, ExceptionCode& ec) > { > if (m_state == Finished) { >- ec = IDBDatabaseException::NOT_ALLOWED_ERR; >+ ec = IDBDatabaseException::IDB_INVALID_STATE_ERR; > return 0; > } > >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index b99b2874f2c2bfe5a0aac3a0eb37b1e1b2f0bc5a..e465b04adab3aadd32a8afebde5dab53af57d565 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,42 @@ >+2012-06-06 Alec Flett <alecflett@chromium.org> >+ >+ IndexedDB: Error codes, phase one >+ https://bugs.webkit.org/show_bug.cgi?id=88459 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * storage/indexeddb/basics-expected.txt: >+ * storage/indexeddb/basics-shared-workers-expected.txt: >+ * storage/indexeddb/basics-workers-expected.txt: >+ * storage/indexeddb/create-and-remove-object-store-expected.txt: >+ * storage/indexeddb/cursor-advance-expected.txt: >+ * storage/indexeddb/cursor-update-expected.txt: >+ * storage/indexeddb/database-basics-expected.txt: >+ * storage/indexeddb/deleteIndex-expected.txt: >+ * storage/indexeddb/resources/basics.js: >+ (test): >+ * storage/indexeddb/resources/create-and-remove-object-store.js: >+ (testCreateAndRemove): >+ (tryOnceMore): >+ * storage/indexeddb/resources/cursor-advance.js: >+ (testBadAdvance.advanceBadly): >+ (testBadAdvance): >+ * storage/indexeddb/resources/cursor-update.js: >+ (keyCursor): >+ * storage/indexeddb/resources/database-basics.js: >+ (testClose): >+ * storage/indexeddb/resources/deleteIndex.js: >+ (postTwiddling): >+ * storage/indexeddb/resources/transaction-after-close.js: >+ (firstTransactionComplete): >+ * storage/indexeddb/resources/transaction-and-objectstore-calls.js: >+ (afterComplete): >+ * storage/indexeddb/resources/transaction-basics.js: >+ (testInvalidMode): >+ * storage/indexeddb/transaction-after-close-expected.txt: >+ * storage/indexeddb/transaction-and-objectstore-calls-expected.txt: >+ * storage/indexeddb/transaction-basics-expected.txt: >+ > 2012-06-07 Sheriff Bot <webkit.review.bot@gmail.com> > > Unreviewed, rolling out r119694. >diff --git a/LayoutTests/storage/indexeddb/basics-expected.txt b/LayoutTests/storage/indexeddb/basics-expected.txt >index d6f142948fd9236fd585eea2181788a78e0886ef..e6793f1e028f3f410f224ded8697d5ea2155a338 100644 >--- a/LayoutTests/storage/indexeddb/basics-expected.txt >+++ b/LayoutTests/storage/indexeddb/basics-expected.txt >@@ -9,18 +9,18 @@ indexedDB.open('basics') > PASS 'result' in request is true > Expecting exception from request.result > PASS Exception was thrown. >-PASS code is IDBDatabaseException.NOT_ALLOWED_ERR >-PASS ename is 'NotAllowedError' >+PASS code is DOMException.INVALID_STATE_ERR >+PASS ename is 'InvalidStateError' > PASS 'errorCode' in request is true > Expecting exception from request.errorCode > PASS Exception was thrown. >-PASS code is IDBDatabaseException.NOT_ALLOWED_ERR >-PASS ename is 'NotAllowedError' >+PASS code is DOMException.INVALID_STATE_ERR >+PASS ename is 'InvalidStateError' > PASS 'webkitErrorMessage' in request is true > Expecting exception from request.webkitErrorMessage > PASS Exception was thrown. >-PASS code is IDBDatabaseException.NOT_ALLOWED_ERR >-PASS ename is 'NotAllowedError' >+PASS code is DOMException.INVALID_STATE_ERR >+PASS ename is 'InvalidStateError' > Expecting exception from request.error > PASS Exception was thrown. > PASS code is DOMException.INVALID_STATE_ERR >diff --git a/LayoutTests/storage/indexeddb/basics-shared-workers-expected.txt b/LayoutTests/storage/indexeddb/basics-shared-workers-expected.txt >index 44a60d0fcef2d474d4962e0bf6b8e9e44e17130b..d812e804daac541f323fb9b887bac8ad5722542b 100644 >--- a/LayoutTests/storage/indexeddb/basics-shared-workers-expected.txt >+++ b/LayoutTests/storage/indexeddb/basics-shared-workers-expected.txt >@@ -10,18 +10,18 @@ Starting worker: resources/basics.js > PASS [Worker] 'result' in request is true > [Worker] Expecting exception from request.result > PASS [Worker] Exception was thrown. >-PASS [Worker] code is IDBDatabaseException.NOT_ALLOWED_ERR >-PASS [Worker] ename is 'NotAllowedError' >+PASS [Worker] code is DOMException.INVALID_STATE_ERR >+PASS [Worker] ename is 'InvalidStateError' > PASS [Worker] 'errorCode' in request is true > [Worker] Expecting exception from request.errorCode > PASS [Worker] Exception was thrown. >-PASS [Worker] code is IDBDatabaseException.NOT_ALLOWED_ERR >-PASS [Worker] ename is 'NotAllowedError' >+PASS [Worker] code is DOMException.INVALID_STATE_ERR >+PASS [Worker] ename is 'InvalidStateError' > PASS [Worker] 'webkitErrorMessage' in request is true > [Worker] Expecting exception from request.webkitErrorMessage > PASS [Worker] Exception was thrown. >-PASS [Worker] code is IDBDatabaseException.NOT_ALLOWED_ERR >-PASS [Worker] ename is 'NotAllowedError' >+PASS [Worker] code is DOMException.INVALID_STATE_ERR >+PASS [Worker] ename is 'InvalidStateError' > [Worker] Expecting exception from request.error > PASS [Worker] Exception was thrown. > PASS [Worker] code is DOMException.INVALID_STATE_ERR >diff --git a/LayoutTests/storage/indexeddb/basics-workers-expected.txt b/LayoutTests/storage/indexeddb/basics-workers-expected.txt >index 205e373e911ae0adbc4175c92f88c478babec750..701e81017eef140aa8fcc6ee4ca37612bf38e683 100644 >--- a/LayoutTests/storage/indexeddb/basics-workers-expected.txt >+++ b/LayoutTests/storage/indexeddb/basics-workers-expected.txt >@@ -10,18 +10,18 @@ Starting worker: resources/basics.js > PASS [Worker] 'result' in request is true > [Worker] Expecting exception from request.result > PASS [Worker] Exception was thrown. >-PASS [Worker] code is IDBDatabaseException.NOT_ALLOWED_ERR >-PASS [Worker] ename is 'NotAllowedError' >+PASS [Worker] code is DOMException.INVALID_STATE_ERR >+PASS [Worker] ename is 'InvalidStateError' > PASS [Worker] 'errorCode' in request is true > [Worker] Expecting exception from request.errorCode > PASS [Worker] Exception was thrown. >-PASS [Worker] code is IDBDatabaseException.NOT_ALLOWED_ERR >-PASS [Worker] ename is 'NotAllowedError' >+PASS [Worker] code is DOMException.INVALID_STATE_ERR >+PASS [Worker] ename is 'InvalidStateError' > PASS [Worker] 'webkitErrorMessage' in request is true > [Worker] Expecting exception from request.webkitErrorMessage > PASS [Worker] Exception was thrown. >-PASS [Worker] code is IDBDatabaseException.NOT_ALLOWED_ERR >-PASS [Worker] ename is 'NotAllowedError' >+PASS [Worker] code is DOMException.INVALID_STATE_ERR >+PASS [Worker] ename is 'InvalidStateError' > [Worker] Expecting exception from request.error > PASS [Worker] Exception was thrown. > PASS [Worker] code is DOMException.INVALID_STATE_ERR >diff --git a/LayoutTests/storage/indexeddb/create-and-remove-object-store-expected.txt b/LayoutTests/storage/indexeddb/create-and-remove-object-store-expected.txt >index 626cce8680030032bf0c60c85e12aa34c1b7eb50..af394c82f482945da61413bfa368dd091e32e557 100644 >--- a/LayoutTests/storage/indexeddb/create-and-remove-object-store-expected.txt >+++ b/LayoutTests/storage/indexeddb/create-and-remove-object-store-expected.txt >@@ -11,24 +11,24 @@ db = event.target.result > Trying create > Expecting exception from db.createObjectStore("some os") > PASS Exception was thrown. >-PASS code is IDBDatabaseException.NOT_ALLOWED_ERR >-PASS ename is 'NotAllowedError' >+PASS code is DOMException.INVALID_STATE_ERR >+PASS ename is 'InvalidStateError' > Trying remove > Expecting exception from db.deleteObjectStore("some os") > PASS Exception was thrown. >-PASS code is IDBDatabaseException.NOT_ALLOWED_ERR >-PASS ename is 'NotAllowedError' >+PASS code is DOMException.INVALID_STATE_ERR >+PASS ename is 'InvalidStateError' > result = db.setVersion('version 1') > Trying create > Expecting exception from db.createObjectStore("some os") > PASS Exception was thrown. >-PASS code is IDBDatabaseException.NOT_ALLOWED_ERR >-PASS ename is 'NotAllowedError' >+PASS code is DOMException.INVALID_STATE_ERR >+PASS ename is 'InvalidStateError' > Trying remove > Expecting exception from db.deleteObjectStore("some os") > PASS Exception was thrown. >-PASS code is IDBDatabaseException.NOT_ALLOWED_ERR >-PASS ename is 'NotAllowedError' >+PASS code is DOMException.INVALID_STATE_ERR >+PASS ename is 'InvalidStateError' > Deleted all object stores. > db.createObjectStore('tmp') > Expecting exception from db.createObjectStore('tmp') >@@ -41,23 +41,23 @@ PASS event.target.result is undefined. > Trying create > Expecting exception from db.createObjectStore("some os") > PASS Exception was thrown. >-PASS code is IDBDatabaseException.NOT_ALLOWED_ERR >-PASS ename is 'NotAllowedError' >+PASS code is DOMException.INVALID_STATE_ERR >+PASS ename is 'InvalidStateError' > Trying remove > Expecting exception from db.deleteObjectStore("some os") > PASS Exception was thrown. >-PASS code is IDBDatabaseException.NOT_ALLOWED_ERR >-PASS ename is 'NotAllowedError' >+PASS code is DOMException.INVALID_STATE_ERR >+PASS ename is 'InvalidStateError' > Trying create with store that already exists > Expecting exception from db.createObjectStore('tmp') > PASS Exception was thrown. >-PASS code is IDBDatabaseException.NOT_ALLOWED_ERR >-PASS ename is 'NotAllowedError' >+PASS code is DOMException.INVALID_STATE_ERR >+PASS ename is 'InvalidStateError' > Trying remove with store that already exists > Expecting exception from db.deleteObjectStore('tmp') > PASS Exception was thrown. >-PASS code is IDBDatabaseException.NOT_ALLOWED_ERR >-PASS ename is 'NotAllowedError' >+PASS code is DOMException.INVALID_STATE_ERR >+PASS ename is 'InvalidStateError' > PASS successfullyParsed is true > > TEST COMPLETE >diff --git a/LayoutTests/storage/indexeddb/cursor-advance-expected.txt b/LayoutTests/storage/indexeddb/cursor-advance-expected.txt >index 64b4f40b13186a6374f4c01b7b8dbfe484cbf347..3ad9e092ebd9292d537b6343e7599fd78e40766d 100644 >--- a/LayoutTests/storage/indexeddb/cursor-advance-expected.txt >+++ b/LayoutTests/storage/indexeddb/cursor-advance-expected.txt >@@ -133,7 +133,7 @@ objectStore = trans.objectStore(objectStoreName) > request = objectStore.openCursor() > Expecting exception from cursor.advance(0) > PASS Exception was thrown. >-PASS code is DOMException.TYPE_MISMATCH_ERR >+PASS code is IDBDatabaseException.TYPE_ERR > testDelete() > trans = db.transaction(objectStoreName, 'readwrite') > objectStore = trans.objectStore(objectStoreName) >diff --git a/LayoutTests/storage/indexeddb/cursor-update-expected.txt b/LayoutTests/storage/indexeddb/cursor-update-expected.txt >index 972ef347e791d01fe09d906d68b585a7b11f79b9..55d95668d9ee6d4aaf8128dbd949410c9dba5bdd 100644 >--- a/LayoutTests/storage/indexeddb/cursor-update-expected.txt >+++ b/LayoutTests/storage/indexeddb/cursor-update-expected.txt >@@ -164,29 +164,29 @@ PASS event.target.result.key is counter + 100 > PASS event.target.result.primaryKey is counter > Expecting exception from event.target.result.update({id: counter, number: counter + 200}) > PASS Exception was thrown. >-PASS code is IDBDatabaseException.NOT_ALLOWED_ERR >-PASS ename is 'NotAllowedError' >+PASS code is DOMException.INVALID_STATE_ERR >+PASS ename is 'InvalidStateError' > keyCursor() > PASS event.target.result.key is counter + 100 > PASS event.target.result.primaryKey is counter > Expecting exception from event.target.result.update({id: counter, number: counter + 200}) > PASS Exception was thrown. >-PASS code is IDBDatabaseException.NOT_ALLOWED_ERR >-PASS ename is 'NotAllowedError' >+PASS code is DOMException.INVALID_STATE_ERR >+PASS ename is 'InvalidStateError' > keyCursor() > PASS event.target.result.key is counter + 100 > PASS event.target.result.primaryKey is counter > Expecting exception from event.target.result.update({id: counter, number: counter + 200}) > PASS Exception was thrown. >-PASS code is IDBDatabaseException.NOT_ALLOWED_ERR >-PASS ename is 'NotAllowedError' >+PASS code is DOMException.INVALID_STATE_ERR >+PASS ename is 'InvalidStateError' > keyCursor() > PASS event.target.result.key is counter + 100 > PASS event.target.result.primaryKey is counter > Expecting exception from event.target.result.update({id: counter, number: counter + 200}) > PASS Exception was thrown. >-PASS code is IDBDatabaseException.NOT_ALLOWED_ERR >-PASS ename is 'NotAllowedError' >+PASS code is DOMException.INVALID_STATE_ERR >+PASS ename is 'InvalidStateError' > keyCursor() > PASS counter is 5 > transactionComplete() >diff --git a/LayoutTests/storage/indexeddb/database-basics-expected.txt b/LayoutTests/storage/indexeddb/database-basics-expected.txt >index 4730f6e5cfc851bf86d95355caa22ad9407c28a5..8b0614ea2462fb6bdb58e212ab76cf2334bdc5c0 100644 >--- a/LayoutTests/storage/indexeddb/database-basics-expected.txt >+++ b/LayoutTests/storage/indexeddb/database-basics-expected.txt >@@ -49,8 +49,8 @@ db.close() > Now that the connection is closed, transaction creation should fail > Expecting exception from db.transaction('test123') > PASS Exception was thrown. >-PASS code is IDBDatabaseException.NOT_ALLOWED_ERR >-PASS ename is 'NotAllowedError' >+PASS code is DOMException.INVALID_STATE_ERR >+PASS ename is 'InvalidStateError' > Call twice, make sure it's harmless > db.close() > PASS successfullyParsed is true >diff --git a/LayoutTests/storage/indexeddb/deleteIndex-expected.txt b/LayoutTests/storage/indexeddb/deleteIndex-expected.txt >index 825433110dcf8a9a0bd50ee743bc8863861b3489..3c1b8cd2f6569bd09953cd6c3d4e22ee729fa257 100644 >--- a/LayoutTests/storage/indexeddb/deleteIndex-expected.txt >+++ b/LayoutTests/storage/indexeddb/deleteIndex-expected.txt >@@ -26,8 +26,8 @@ returnValue = objectStore.deleteIndex('first'); > PASS returnValue is undefined > Expecting exception from db.createObjectStore('bar'); > PASS Exception was thrown. >-PASS code is IDBDatabaseException.NOT_ALLOWED_ERR >-PASS ename is 'NotAllowedError' >+PASS code is DOMException.INVALID_STATE_ERR >+PASS ename is 'InvalidStateError' > Expecting exception from objectStore.deleteIndex('second') > PASS Exception was thrown. > PASS code is IDBDatabaseException.TRANSACTION_INACTIVE_ERR >diff --git a/LayoutTests/storage/indexeddb/resources/basics.js b/LayoutTests/storage/indexeddb/resources/basics.js >index c17e92a2b31d985b31a5d52408611fd12dfa9782..7875979d5e83d3d7a6cd6336914ac0f77d5eda48 100644 >--- a/LayoutTests/storage/indexeddb/resources/basics.js >+++ b/LayoutTests/storage/indexeddb/resources/basics.js >@@ -10,11 +10,11 @@ function test() > removeVendorPrefixes(); > request = evalAndLog("indexedDB.open('basics')"); > shouldBeTrue("'result' in request"); >- evalAndExpectException("request.result", "IDBDatabaseException.NOT_ALLOWED_ERR", "'NotAllowedError'"); >+ evalAndExpectException("request.result", "DOMException.INVALID_STATE_ERR", "'InvalidStateError'"); > shouldBeTrue("'errorCode' in request"); >- evalAndExpectException("request.errorCode", "IDBDatabaseException.NOT_ALLOWED_ERR", "'NotAllowedError'"); >+ evalAndExpectException("request.errorCode", "DOMException.INVALID_STATE_ERR", "'InvalidStateError'"); > shouldBeTrue("'webkitErrorMessage' in request"); >- evalAndExpectException("request.webkitErrorMessage", "IDBDatabaseException.NOT_ALLOWED_ERR", "'NotAllowedError'"); >+ evalAndExpectException("request.webkitErrorMessage", "DOMException.INVALID_STATE_ERR", "'InvalidStateError'"); > evalAndExpectException("request.error", "DOMException.INVALID_STATE_ERR", "'InvalidStateError'"); > shouldBeTrue("'source' in request"); > shouldBe("request.source", "indexedDB"); >diff --git a/LayoutTests/storage/indexeddb/resources/create-and-remove-object-store.js b/LayoutTests/storage/indexeddb/resources/create-and-remove-object-store.js >index 51e2a617855a6ff495a2c6afe359f67feeeb9e12..d2c6994620a0d1027dc10a0a497bf9bc6e098c8e 100644 >--- a/LayoutTests/storage/indexeddb/resources/create-and-remove-object-store.js >+++ b/LayoutTests/storage/indexeddb/resources/create-and-remove-object-store.js >@@ -27,9 +27,9 @@ function openSuccess() > function testCreateAndRemove() > { > debug("Trying create"); >- evalAndExpectException('db.createObjectStore("some os")', "IDBDatabaseException.NOT_ALLOWED_ERR", "'NotAllowedError'"); >+ evalAndExpectException('db.createObjectStore("some os")', "DOMException.INVALID_STATE_ERR", "'InvalidStateError'"); > debug("Trying remove"); >- evalAndExpectException('db.deleteObjectStore("some os")', "IDBDatabaseException.NOT_ALLOWED_ERR", "'NotAllowedError'"); >+ evalAndExpectException('db.deleteObjectStore("some os")', "DOMException.INVALID_STATE_ERR", "'InvalidStateError'"); > } > > function cleanDatabase() >@@ -56,9 +56,9 @@ function tryOnceMore() > testCreateAndRemove(); > > debug("Trying create with store that already exists"); >- evalAndExpectException("db.createObjectStore('tmp')", "IDBDatabaseException.NOT_ALLOWED_ERR", "'NotAllowedError'"); >+ evalAndExpectException("db.createObjectStore('tmp')", "DOMException.INVALID_STATE_ERR", "'InvalidStateError'"); > debug("Trying remove with store that already exists"); >- evalAndExpectException("db.deleteObjectStore('tmp')", "IDBDatabaseException.NOT_ALLOWED_ERR", "'NotAllowedError'"); >+ evalAndExpectException("db.deleteObjectStore('tmp')", "DOMException.INVALID_STATE_ERR", "'InvalidStateError'"); > > finishJSTest(); > } >diff --git a/LayoutTests/storage/indexeddb/resources/cursor-advance.js b/LayoutTests/storage/indexeddb/resources/cursor-advance.js >index 9db5bfb5e50b9eeba321b64e1080f9bc01516e3a..ffa93389fb4f3c9a5ac94e6650d52a9a7850233e 100644 >--- a/LayoutTests/storage/indexeddb/resources/cursor-advance.js >+++ b/LayoutTests/storage/indexeddb/resources/cursor-advance.js >@@ -326,8 +326,7 @@ function testBadAdvance() > { > cursor = event.target.result; > >- // FIXME: this should throw a TypeError. (See IDBCursor.cpp) >- evalAndExpectException("cursor.advance(0)", "DOMException.TYPE_MISMATCH_ERR"); >+ evalAndExpectException("cursor.advance(0)", "IDBDatabaseException.TYPE_ERR"); > testDelete(); > } > request.onsuccess = advanceBadly; >diff --git a/LayoutTests/storage/indexeddb/resources/cursor-update.js b/LayoutTests/storage/indexeddb/resources/cursor-update.js >index b3060d49a30e841ff289b5cd08294c67933f4934..d02c625433380112811210dd834334d654b84952 100644 >--- a/LayoutTests/storage/indexeddb/resources/cursor-update.js >+++ b/LayoutTests/storage/indexeddb/resources/cursor-update.js >@@ -197,7 +197,7 @@ function keyCursor() > shouldBe("event.target.result.primaryKey", "counter"); > > evalAndExpectException("event.target.result.update({id: counter, number: counter + 200})", >- "IDBDatabaseException.NOT_ALLOWED_ERR", "'NotAllowedError'"); >+ "DOMException.INVALID_STATE_ERR", "'InvalidStateError'"); > > counter++; > event.target.result.continue(); >diff --git a/LayoutTests/storage/indexeddb/resources/database-basics.js b/LayoutTests/storage/indexeddb/resources/database-basics.js >index ebfad91fda09528232801e9041e4de40e6cb3c27..b2df73988cecbfd704228c70293d9dae4c5fa095 100644 >--- a/LayoutTests/storage/indexeddb/resources/database-basics.js >+++ b/LayoutTests/storage/indexeddb/resources/database-basics.js >@@ -106,7 +106,7 @@ function testClose() > { > evalAndLog("db.close()"); > debug("Now that the connection is closed, transaction creation should fail"); >- evalAndExpectException("db.transaction('test123')", "IDBDatabaseException.NOT_ALLOWED_ERR", "'NotAllowedError'"); >+ evalAndExpectException("db.transaction('test123')", "DOMException.INVALID_STATE_ERR", "'InvalidStateError'"); > debug("Call twice, make sure it's harmless"); > evalAndLog("db.close()"); > finishJSTest(); >diff --git a/LayoutTests/storage/indexeddb/resources/deleteIndex.js b/LayoutTests/storage/indexeddb/resources/deleteIndex.js >index 244ae56732cd7b7cc91817adb83740c26c744f86..6734fee2e3a2295ea74dc6b1a384c8077d61b17f 100644 >--- a/LayoutTests/storage/indexeddb/resources/deleteIndex.js >+++ b/LayoutTests/storage/indexeddb/resources/deleteIndex.js >@@ -42,7 +42,7 @@ function twiddleIndexes() > > function postTwiddling() > { >- evalAndExpectException("db.createObjectStore('bar');", "IDBDatabaseException.NOT_ALLOWED_ERR", "'NotAllowedError'"); >+ evalAndExpectException("db.createObjectStore('bar');", "DOMException.INVALID_STATE_ERR", "'InvalidStateError'"); > evalAndExpectException("objectStore.deleteIndex('second')", "IDBDatabaseException.TRANSACTION_INACTIVE_ERR", "'TransactionInactiveError'"); > finishJSTest(); > } >diff --git a/LayoutTests/storage/indexeddb/resources/transaction-after-close.js b/LayoutTests/storage/indexeddb/resources/transaction-after-close.js >index ac887933deb5c29a4b83804076a55c69589a4045..eb3479f273edb763663a942fb422602497fdcab9 100644 >--- a/LayoutTests/storage/indexeddb/resources/transaction-after-close.js >+++ b/LayoutTests/storage/indexeddb/resources/transaction-after-close.js >@@ -54,7 +54,7 @@ function runFirstRegularTransaction() > function firstTransactionComplete() > { > evalAndLog("db.close()"); >- evalAndExpectException("db.transaction(['store'], 'readwrite')", "IDBDatabaseException.NOT_ALLOWED_ERR", "'NotAllowedError'"); >+ evalAndExpectException("db.transaction(['store'], 'readwrite')", "DOMException.INVALID_STATE_ERR", "'InvalidStateError'"); > > debug("") > debug("verify that we can reopen the db after calling close") >diff --git a/LayoutTests/storage/indexeddb/resources/transaction-and-objectstore-calls.js b/LayoutTests/storage/indexeddb/resources/transaction-and-objectstore-calls.js >index 7bb5ef4cf4ac5e0c0355aba55b49cf6563e79bcf..b9ca45bcbf6344db5a340c351c6697d0573ada8f 100644 >--- a/LayoutTests/storage/indexeddb/resources/transaction-and-objectstore-calls.js >+++ b/LayoutTests/storage/indexeddb/resources/transaction-and-objectstore-calls.js >@@ -115,8 +115,8 @@ function afterComplete() > debug("transaction complete, ensuring methods fail"); > shouldBeNonNull("trans"); > shouldBeNonNull("store"); >- evalAndExpectException("trans.objectStore('store')", "IDBDatabaseException.NOT_ALLOWED_ERR", "'NotAllowedError'"); >- evalAndExpectException("store.index('index')", "IDBDatabaseException.NOT_ALLOWED_ERR", "'NotAllowedError'"); >+ evalAndExpectException("trans.objectStore('store')", "DOMException.INVALID_STATE_ERR", "'InvalidStateError'"); >+ evalAndExpectException("store.index('index')", "DOMException.INVALID_STATE_ERR", "'InvalidStateError'"); > > finishJSTest(); > } >diff --git a/LayoutTests/storage/indexeddb/resources/transaction-basics.js b/LayoutTests/storage/indexeddb/resources/transaction-basics.js >index 8fa70162b81b9f1e7a26a1145a4084ad7d0484fd..6061c7dcd8b574c6da56a71915fe46af50798745 100644 >--- a/LayoutTests/storage/indexeddb/resources/transaction-basics.js >+++ b/LayoutTests/storage/indexeddb/resources/transaction-basics.js >@@ -279,7 +279,7 @@ function testInvalidMode() > { > debug(""); > debug("Verify that specifying an invalid mode raises an exception"); >- evalAndExpectException("db.transaction(['storeName'], 'lsakjdf')", "IDBDatabaseException.NOT_ALLOWED_ERR", "'NotAllowedError'"); >+ evalAndExpectException("db.transaction(['storeName'], 'lsakjdf')", "IDBDatabaseException.TYPE_ERR", "'TypeError'"); > finishJSTest(); > } > >diff --git a/LayoutTests/storage/indexeddb/transaction-after-close-expected.txt b/LayoutTests/storage/indexeddb/transaction-after-close-expected.txt >index a583c52cdbb5331d78c5c826cf81c00cf1ea9256..aefae121db9347699dd17ed3bdaf2f72379a4fdd 100644 >--- a/LayoutTests/storage/indexeddb/transaction-after-close-expected.txt >+++ b/LayoutTests/storage/indexeddb/transaction-after-close-expected.txt >@@ -19,8 +19,8 @@ objectStore.put('a', 'b') > db.close() > Expecting exception from db.transaction(['store'], 'readwrite') > PASS Exception was thrown. >-PASS code is IDBDatabaseException.NOT_ALLOWED_ERR >-PASS ename is 'NotAllowedError' >+PASS code is DOMException.INVALID_STATE_ERR >+PASS ename is 'InvalidStateError' > > verify that we can reopen the db after calling close > indexedDB.open('transaction-after-close') >diff --git a/LayoutTests/storage/indexeddb/transaction-and-objectstore-calls-expected.txt b/LayoutTests/storage/indexeddb/transaction-and-objectstore-calls-expected.txt >index 478d3ccffc6100a22f011bdd75f03deedf07389f..41dec8663f1835bb97bc5fd85862499c93f54918 100644 >--- a/LayoutTests/storage/indexeddb/transaction-and-objectstore-calls-expected.txt >+++ b/LayoutTests/storage/indexeddb/transaction-and-objectstore-calls-expected.txt >@@ -137,12 +137,12 @@ PASS trans is non-null. > PASS store is non-null. > Expecting exception from trans.objectStore('store') > PASS Exception was thrown. >-PASS code is IDBDatabaseException.NOT_ALLOWED_ERR >-PASS ename is 'NotAllowedError' >+PASS code is DOMException.INVALID_STATE_ERR >+PASS ename is 'InvalidStateError' > Expecting exception from store.index('index') > PASS Exception was thrown. >-PASS code is IDBDatabaseException.NOT_ALLOWED_ERR >-PASS ename is 'NotAllowedError' >+PASS code is DOMException.INVALID_STATE_ERR >+PASS ename is 'InvalidStateError' > PASS successfullyParsed is true > > TEST COMPLETE >diff --git a/LayoutTests/storage/indexeddb/transaction-basics-expected.txt b/LayoutTests/storage/indexeddb/transaction-basics-expected.txt >index 5fc251555e7cf90f55d2edcb55fd65402d32ccbe..0dfc5bdf9e4ec346e458f9ca6dd1e4aaafed989b 100644 >--- a/LayoutTests/storage/indexeddb/transaction-basics-expected.txt >+++ b/LayoutTests/storage/indexeddb/transaction-basics-expected.txt >@@ -194,8 +194,8 @@ PASS all stores present in transaction > Verify that specifying an invalid mode raises an exception > Expecting exception from db.transaction(['storeName'], 'lsakjdf') > PASS Exception was thrown. >-PASS code is IDBDatabaseException.NOT_ALLOWED_ERR >-PASS ename is 'NotAllowedError' >+PASS code is IDBDatabaseException.TYPE_ERR >+PASS ename is 'TypeError' > PASS successfullyParsed is true > > TEST COMPLETE
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 88459
:
146118
|
146313
|
146320
|
146360