Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(517)

Unified Diff: third_party/WebKit/Source/modules/indexeddb/IDBRequest.cpp

Issue 1479923002: Enumerate the return value of dispatchEvent so it is clear. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master_passive_uma_add
Patch Set: sed -i s/DispatchEventResult/WebInputEventResult/g Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/indexeddb/IDBRequest.cpp
diff --git a/third_party/WebKit/Source/modules/indexeddb/IDBRequest.cpp b/third_party/WebKit/Source/modules/indexeddb/IDBRequest.cpp
index f7f5dc782f6dc5576e9e1cb709d945119c05d755..009c0500666cc62369368d0c4c40c1ce0971f814 100644
--- a/third_party/WebKit/Source/modules/indexeddb/IDBRequest.cpp
+++ b/third_party/WebKit/Source/modules/indexeddb/IDBRequest.cpp
@@ -411,11 +411,11 @@ ExecutionContext* IDBRequest::executionContext() const
return ActiveDOMObject::executionContext();
}
-bool IDBRequest::dispatchEventInternal(PassRefPtrWillBeRawPtr<Event> event)
+WebInputEventResult IDBRequest::dispatchEventInternal(PassRefPtrWillBeRawPtr<Event> event)
{
IDB_TRACE("IDBRequest::dispatchEvent");
if (m_contextStopped || !executionContext())
- return false;
+ return WebInputEventResult::HandledSuppressed;
ASSERT(m_readyState == PENDING);
ASSERT(m_hasPendingActivity);
ASSERT(m_enqueuedEvents.size());
@@ -458,7 +458,7 @@ bool IDBRequest::dispatchEventInternal(PassRefPtrWillBeRawPtr<Event> event)
if (setTransactionActive)
m_transaction->setActive(true);
- bool dontPreventDefault = IDBEventDispatcher::dispatch(event.get(), targets);
jsbell 2015/12/03 00:46:18 Very happy to see this going away. :)
dtapuska 2015/12/03 02:00:53 Thanks for the happiness :-)
+ WebInputEventResult eventResult = IDBEventDispatcher::dispatch(event.get(), targets);
if (m_transaction) {
if (m_readyState == DONE)
@@ -466,7 +466,7 @@ bool IDBRequest::dispatchEventInternal(PassRefPtrWillBeRawPtr<Event> event)
// Possibly abort the transaction. This must occur after unregistering (so this request
// doesn't receive a second error) and before deactivating (which might trigger commit).
- if (event->type() == EventTypeNames::error && dontPreventDefault && !m_requestAborted) {
+ if (event->type() == EventTypeNames::error && eventResult == WebInputEventResult::NotHandled && !m_requestAborted) {
m_transaction->setError(m_error);
m_transaction->abort(IGNORE_EXCEPTION);
}
@@ -484,7 +484,7 @@ bool IDBRequest::dispatchEventInternal(PassRefPtrWillBeRawPtr<Event> event)
if (m_readyState == DONE && event->type() != EventTypeNames::upgradeneeded)
m_hasPendingActivity = false;
- return dontPreventDefault;
+ return eventResult;
}
void IDBRequest::uncaughtExceptionInEventHandler()

Powered by Google App Engine
This is Rietveld 408576698