Title: [125943] trunk/Source/WebCore
Revision
125943
Author
[email protected]
Date
2012-08-17 16:11:22 -0700 (Fri, 17 Aug 2012)

Log Message

IndexedDB: Test if getting a TRANSACTION_INACTIVE_ERR is possible when setting version
https://bugs.webkit.org/show_bug.cgi?id=94269

Reviewed by Ojan Vafai.

I don't see a path through which this code is exercised.
ASSERT_NOT_REACHED doesn't cause any of our tests to fail. It might be
timing-related, in which case this ASSERT should be sporadically hit.
If this ASSERT is hit, see if we can write a test that exercises it or
at least add comments explaining how it gets exercised. If this ASSERT
is not hit after a while, change it to
ASSERT(transaction.scheduleTask(...)).

No new tests, we're looking for existing tests to fail.

* Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
(WebCore::IDBDatabaseBackendImpl::setVersion):
(WebCore::IDBDatabaseBackendImpl::runIntVersionChangeTransaction):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (125942 => 125943)


--- trunk/Source/WebCore/ChangeLog	2012-08-17 23:07:19 UTC (rev 125942)
+++ trunk/Source/WebCore/ChangeLog	2012-08-17 23:11:22 UTC (rev 125943)
@@ -1,3 +1,24 @@
+2012-08-17  David Grogan  <[email protected]>
+
+        IndexedDB: Test if getting a TRANSACTION_INACTIVE_ERR is possible when setting version
+        https://bugs.webkit.org/show_bug.cgi?id=94269
+
+        Reviewed by Ojan Vafai.
+
+        I don't see a path through which this code is exercised.
+        ASSERT_NOT_REACHED doesn't cause any of our tests to fail. It might be
+        timing-related, in which case this ASSERT should be sporadically hit.
+        If this ASSERT is hit, see if we can write a test that exercises it or
+        at least add comments explaining how it gets exercised. If this ASSERT
+        is not hit after a while, change it to
+        ASSERT(transaction.scheduleTask(...)).
+
+        No new tests, we're looking for existing tests to fail.
+
+        * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
+        (WebCore::IDBDatabaseBackendImpl::setVersion):
+        (WebCore::IDBDatabaseBackendImpl::runIntVersionChangeTransaction):
+
 2012-08-17  Sheriff Bot  <[email protected]>
 
         Unreviewed, rolling out r125922.

Modified: trunk/Source/WebCore/Modules/indexeddb/IDBDatabaseBackendImpl.cpp (125942 => 125943)


--- trunk/Source/WebCore/Modules/indexeddb/IDBDatabaseBackendImpl.cpp	2012-08-17 23:07:19 UTC (rev 125942)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBDatabaseBackendImpl.cpp	2012-08-17 23:11:22 UTC (rev 125943)
@@ -267,6 +267,8 @@
     if (!transaction->scheduleTask(
             createCallbackTask(&IDBDatabaseBackendImpl::setVersionInternal, database, version, callbacks, transaction),
             createCallbackTask(&IDBDatabaseBackendImpl::resetVersion, database, m_version))) {
+        // FIXME: Remove one of the following lines.
+        ASSERT_NOT_REACHED();
         ec = IDBDatabaseException::TRANSACTION_INACTIVE_ERR;
     }
 }
@@ -479,8 +481,11 @@
     OwnPtr<ScriptExecutionContext::Task> intVersionTask = createCallbackTask(&IDBDatabaseBackendImpl::setIntVersionInternal, database, requestedVersion, callbacks, transaction);
     // FIXME: Make this reset the integer version as well.
     OwnPtr<ScriptExecutionContext::Task> resetVersionOnAbortTask = createCallbackTask(&IDBDatabaseBackendImpl::resetVersion, database, m_version);
-    if (!transaction->scheduleTask(intVersionTask.release(), resetVersionOnAbortTask.release()))
+    if (!transaction->scheduleTask(intVersionTask.release(), resetVersionOnAbortTask.release())) {
+        // FIXME: Remove one of the following lines.
+        ASSERT_NOT_REACHED();
         ec = IDBDatabaseException::TRANSACTION_INACTIVE_ERR;
+    }
     m_pendingSecondHalfOpenWithVersionCalls.append(PendingOpenWithVersionCall::create(callbacks, requestedVersion));
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to