Title: [145917] trunk/Source
- Revision
- 145917
- Author
- [email protected]
- Date
- 2013-03-15 11:00:03 -0700 (Fri, 15 Mar 2013)
Log Message
IndexedDB: Handle success events arriving after context stopped
https://bugs.webkit.org/show_bug.cgi?id=112451
Reviewed by Tony Chang.
Source/WebCore:
In multiprocess ports, events from the back-end can arrive in the form of
onXXX() calls after the script execution context has stopped. These need to
be ignored. This was already done in most cases, but missing for two overloads
of IDBRequest::onSuccess() - void and int64_t.
Test: webkit_unit_test IDBRequestTest.EventsAfterStopping
* Modules/indexeddb/IDBRequest.cpp:
(WebCore::IDBRequest::onSuccess): Early return if context has stopped.
(WebCore::IDBRequest::onSuccessInternal): ASSERT() that callers have checked context.
Source/WebKit/chromium:
* tests/IDBRequestTest.cpp:
(WebKit::TEST_F): Add cases for onSuccess() and onSuccess(int64_t)
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (145916 => 145917)
--- trunk/Source/WebCore/ChangeLog 2013-03-15 17:59:44 UTC (rev 145916)
+++ trunk/Source/WebCore/ChangeLog 2013-03-15 18:00:03 UTC (rev 145917)
@@ -1,3 +1,21 @@
+2013-03-15 Joshua Bell <[email protected]>
+
+ IndexedDB: Handle success events arriving after context stopped
+ https://bugs.webkit.org/show_bug.cgi?id=112451
+
+ Reviewed by Tony Chang.
+
+ In multiprocess ports, events from the back-end can arrive in the form of
+ onXXX() calls after the script execution context has stopped. These need to
+ be ignored. This was already done in most cases, but missing for two overloads
+ of IDBRequest::onSuccess() - void and int64_t.
+
+ Test: webkit_unit_test IDBRequestTest.EventsAfterStopping
+
+ * Modules/indexeddb/IDBRequest.cpp:
+ (WebCore::IDBRequest::onSuccess): Early return if context has stopped.
+ (WebCore::IDBRequest::onSuccessInternal): ASSERT() that callers have checked context.
+
2013-03-14 Jer Noble <[email protected]>
REGRESSION: -webkit-box-reflect does not show on video elements
Modified: trunk/Source/WebCore/Modules/indexeddb/IDBRequest.cpp (145916 => 145917)
--- trunk/Source/WebCore/Modules/indexeddb/IDBRequest.cpp 2013-03-15 17:59:44 UTC (rev 145916)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBRequest.cpp 2013-03-15 18:00:03 UTC (rev 145917)
@@ -371,16 +371,23 @@
void IDBRequest::onSuccess(int64_t value)
{
+ IDB_TRACE("IDBRequest::onSuccess(int64_t)");
+ if (!shouldEnqueueEvent())
+ return;
return onSuccessInternal(SerializedScriptValue::numberValue(value));
}
void IDBRequest::onSuccess()
{
+ IDB_TRACE("IDBRequest::onSuccess()");
+ if (!shouldEnqueueEvent())
+ return;
return onSuccessInternal(SerializedScriptValue::undefinedValue());
}
void IDBRequest::onSuccessInternal(PassRefPtr<SerializedScriptValue> value)
{
+ ASSERT(!m_contextStopped);
DOMRequestState::Scope scope(m_requestState);
return onSuccessInternal(deserializeIDBValue(requestState(), value));
}
Modified: trunk/Source/WebKit/chromium/ChangeLog (145916 => 145917)
--- trunk/Source/WebKit/chromium/ChangeLog 2013-03-15 17:59:44 UTC (rev 145916)
+++ trunk/Source/WebKit/chromium/ChangeLog 2013-03-15 18:00:03 UTC (rev 145917)
@@ -1,3 +1,13 @@
+2013-03-15 Joshua Bell <[email protected]>
+
+ IndexedDB: Handle success events arriving after context stopped
+ https://bugs.webkit.org/show_bug.cgi?id=112451
+
+ Reviewed by Tony Chang.
+
+ * tests/IDBRequestTest.cpp:
+ (WebKit::TEST_F): Add cases for onSuccess() and onSuccess(int64_t)
+
2013-03-15 Nate Chapin <[email protected]>
Hide MainResourceLoader from the outside world
Modified: trunk/Source/WebKit/chromium/tests/IDBRequestTest.cpp (145916 => 145917)
--- trunk/Source/WebKit/chromium/tests/IDBRequestTest.cpp 2013-03-15 17:59:44 UTC (rev 145916)
+++ trunk/Source/WebKit/chromium/tests/IDBRequestTest.cpp 2013-03-15 18:00:03 UTC (rev 145917)
@@ -96,6 +96,8 @@
request->onSuccess(IDBKey::createInvalid());
request->onSuccess(PassRefPtr<SharedBuffer>(0));
request->onSuccess(PassRefPtr<SharedBuffer>(0), IDBKey::createInvalid(), IDBKeyPath());
+ request->onSuccess(0LL);
+ request->onSuccess();
request->onSuccess(IDBKey::createInvalid(), IDBKey::createInvalid(), 0);
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes