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

Unified Diff: third_party/WebKit/Source/modules/indexeddb/IDBTransaction.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: Fix typo Created 4 years, 10 months 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/IDBTransaction.cpp
diff --git a/third_party/WebKit/Source/modules/indexeddb/IDBTransaction.cpp b/third_party/WebKit/Source/modules/indexeddb/IDBTransaction.cpp
index 302ad1b368d523e52ce3508d837b4b099d3b243f..c9d648a0ca2cdd90daf6bbf04000952ae733d292 100644
--- a/third_party/WebKit/Source/modules/indexeddb/IDBTransaction.cpp
+++ b/third_party/WebKit/Source/modules/indexeddb/IDBTransaction.cpp
@@ -344,12 +344,12 @@ ExecutionContext* IDBTransaction::executionContext() const
return ActiveDOMObject::executionContext();
}
-bool IDBTransaction::dispatchEventInternal(PassRefPtrWillBeRawPtr<Event> event)
+DispatchEventResult IDBTransaction::dispatchEventInternal(PassRefPtrWillBeRawPtr<Event> event)
{
IDB_TRACE("IDBTransaction::dispatchEvent");
if (m_contextStopped || !executionContext()) {
m_state = Finished;
- return false;
+ return DispatchEventResult::CanceledBeforeDispatch;
}
ASSERT(m_state != Finished);
ASSERT(m_hasPendingActivity);
@@ -371,7 +371,7 @@ bool IDBTransaction::dispatchEventInternal(PassRefPtrWillBeRawPtr<Event> event)
// FIXME: When we allow custom event dispatching, this will probably need to change.
ASSERT(event->type() == EventTypeNames::complete || event->type() == EventTypeNames::abort);
- bool returnValue = IDBEventDispatcher::dispatch(event.get(), targets);
+ DispatchEventResult dispatchResult = IDBEventDispatcher::dispatch(event.get(), targets);
// FIXME: Try to construct a test where |this| outlives openDBRequest and we
// get a crash.
if (m_openDBRequest) {
@@ -379,7 +379,7 @@ bool IDBTransaction::dispatchEventInternal(PassRefPtrWillBeRawPtr<Event> event)
m_openDBRequest->transactionDidFinishAndDispatch();
}
m_hasPendingActivity = false;
- return returnValue;
+ return dispatchResult;
}
void IDBTransaction::stop()

Powered by Google App Engine
This is Rietveld 408576698