Diff
Modified: trunk/Source/WebCore/ChangeLog (125712 => 125713)
--- trunk/Source/WebCore/ChangeLog 2012-08-15 21:41:59 UTC (rev 125712)
+++ trunk/Source/WebCore/ChangeLog 2012-08-15 21:54:50 UTC (rev 125713)
@@ -1,3 +1,25 @@
+2012-08-15 David Grogan <[email protected]>
+
+ IndexedDB: Add some ASSERTs
+ https://bugs.webkit.org/show_bug.cgi?id=94055
+
+ Reviewed by Ojan Vafai.
+
+ These are just some additional ASSERTS and some ASSERT_WITH_MESSAGE in
+ place of ASSERT. They are from the patch in
+ https://bugs.webkit.org/show_bug.cgi?id=92897
+
+ No new tests - we should never hit this behavior.
+
+ * Modules/indexeddb/IDBDatabase.cpp:
+ (WebCore::IDBDatabase::setVersion):
+ (WebCore::IDBDatabase::registerFrontendCallbacks):
+ * Modules/indexeddb/IDBRequest.cpp:
+ (WebCore::IDBRequest::dispatchEvent):
+ (WebCore::IDBRequest::enqueueEvent):
+ * Modules/indexeddb/IDBTransaction.cpp:
+ (WebCore::IDBTransaction::setActive):
+
2012-08-15 Sheriff Bot <[email protected]>
Unreviewed, rolling out r125687.
Modified: trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.cpp (125712 => 125713)
--- trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.cpp 2012-08-15 21:41:59 UTC (rev 125712)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.cpp 2012-08-15 21:54:50 UTC (rev 125713)
@@ -208,6 +208,7 @@
}
RefPtr<IDBVersionChangeRequest> request = IDBVersionChangeRequest::create(context, IDBAny::create(this), version);
+ ASSERT(m_backend);
m_backend->setVersion(version, request, m_databaseCallbacks, ec);
return request;
}
@@ -314,6 +315,7 @@
void IDBDatabase::registerFrontendCallbacks()
{
+ ASSERT(m_backend);
m_backend->registerFrontendCallbacks(m_databaseCallbacks);
}
Modified: trunk/Source/WebCore/Modules/indexeddb/IDBRequest.cpp (125712 => 125713)
--- trunk/Source/WebCore/Modules/indexeddb/IDBRequest.cpp 2012-08-15 21:41:59 UTC (rev 125712)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBRequest.cpp 2012-08-15 21:54:50 UTC (rev 125713)
@@ -426,8 +426,7 @@
ASSERT(m_enqueuedEvents.size());
ASSERT(scriptExecutionContext());
ASSERT(event->target() == this);
- ASSERT_WITH_MESSAGE(m_readyState < DONE, "m_readyState < DONE(%d), was %d", DONE, m_readyState);
-
+ ASSERT_WITH_MESSAGE(m_readyState < DONE, "When dispatching event %s, m_readyState < DONE(%d), was %d", event->type().string().utf8().data(), DONE, m_readyState);
if (event->type() != eventNames().blockedEvent)
m_readyState = DONE;
@@ -456,7 +455,7 @@
}
// FIXME: When we allow custom event dispatching, this will probably need to change.
- ASSERT(event->type() == eventNames().successEvent || event->type() == eventNames().errorEvent || event->type() == eventNames().blockedEvent);
+ ASSERT_WITH_MESSAGE(event->type() == eventNames().successEvent || event->type() == eventNames().errorEvent || event->type() == eventNames().blockedEvent, "event type was %s", event->type().string().utf8().data());
const bool setTransactionActive = m_transaction && (event->type() == eventNames().successEvent || (event->type() == eventNames().errorEvent && m_errorCode != IDBDatabaseException::IDB_ABORT_ERR));
if (setTransactionActive)
@@ -501,7 +500,7 @@
if (m_contextStopped || !scriptExecutionContext())
return;
- ASSERT(m_readyState == PENDING);
+ ASSERT_WITH_MESSAGE(m_readyState == PENDING, "When queueing event %s, m_readyState was %d", event->type().string().utf8().data(), m_readyState);
EventQueue* eventQueue = scriptExecutionContext()->eventQueue();
event->setTarget(this);
Modified: trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.cpp (125712 => 125713)
--- trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.cpp 2012-08-15 21:41:59 UTC (rev 125712)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.cpp 2012-08-15 21:54:50 UTC (rev 125713)
@@ -182,7 +182,7 @@
void IDBTransaction::setActive(bool active)
{
- ASSERT(m_state != Finished);
+ ASSERT_WITH_MESSAGE(m_state != Finished, "A finished transaction tried to setActive(%s)", active ? "true" : "false");
if (m_state == Finishing)
return;
ASSERT(m_state == Unused || m_state == Used);
Modified: trunk/Source/WebKit/chromium/ChangeLog (125712 => 125713)
--- trunk/Source/WebKit/chromium/ChangeLog 2012-08-15 21:41:59 UTC (rev 125712)
+++ trunk/Source/WebKit/chromium/ChangeLog 2012-08-15 21:54:50 UTC (rev 125713)
@@ -1,3 +1,13 @@
+2012-08-15 David Grogan <[email protected]>
+
+ IndexedDB: Add some ASSERTs
+ https://bugs.webkit.org/show_bug.cgi?id=94055
+
+ Reviewed by Ojan Vafai.
+
+ * src/IDBDatabaseBackendProxy.cpp:
+ (WebKit::IDBDatabaseBackendProxy::setVersion):
+
2012-08-15 Ian Vollick <[email protected]>
[chromium] Must account for empty transformation lists when checking for big rotations.
Modified: trunk/Source/WebKit/chromium/src/IDBDatabaseBackendProxy.cpp (125712 => 125713)
--- trunk/Source/WebKit/chromium/src/IDBDatabaseBackendProxy.cpp 2012-08-15 21:41:59 UTC (rev 125712)
+++ trunk/Source/WebKit/chromium/src/IDBDatabaseBackendProxy.cpp 2012-08-15 21:54:50 UTC (rev 125713)
@@ -87,6 +87,7 @@
void IDBDatabaseBackendProxy::setVersion(const String& version, PassRefPtr<IDBCallbacks> callbacks, PassRefPtr<IDBDatabaseCallbacks> databaseCallbacks, ExceptionCode& ec)
{
+ ASSERT(m_webIDBDatabase);
m_webIDBDatabase->setVersion(version, new WebIDBCallbacksImpl(callbacks), ec);
}