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

Unified Diff: third_party/WebKit/Source/modules/indexeddb/IDBDatabase.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 up phillip's comments 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/IDBDatabase.cpp
diff --git a/third_party/WebKit/Source/modules/indexeddb/IDBDatabase.cpp b/third_party/WebKit/Source/modules/indexeddb/IDBDatabase.cpp
index b67f4d0f95554ac640ed90e4b83c083dea49590c..76139ec96c6d1ff89ae9d3db686382959eaa07f6 100644
--- a/third_party/WebKit/Source/modules/indexeddb/IDBDatabase.cpp
+++ b/third_party/WebKit/Source/modules/indexeddb/IDBDatabase.cpp
@@ -387,21 +387,21 @@ void IDBDatabase::enqueueEvent(PassRefPtrWillBeRawPtr<Event> event)
m_enqueuedEvents.append(event);
}
-bool IDBDatabase::dispatchEventInternal(PassRefPtrWillBeRawPtr<Event> event)
+DispatchEventResult IDBDatabase::dispatchEventInternal(PassRefPtrWillBeRawPtr<Event> event)
{
IDB_TRACE("IDBDatabase::dispatchEvent");
if (m_contextStopped || !executionContext())
- return false;
+ return DispatchEventResult::CanceledBeforeDispatch;
ASSERT(event->type() == EventTypeNames::versionchange || event->type() == EventTypeNames::close);
for (size_t i = 0; i < m_enqueuedEvents.size(); ++i) {
if (m_enqueuedEvents[i].get() == event.get())
m_enqueuedEvents.remove(i);
}
- bool result = EventTarget::dispatchEventInternal(event.get());
+ DispatchEventResult dispatchResult = EventTarget::dispatchEventInternal(event.get());
if (event->type() == EventTypeNames::versionchange && !m_closePending && m_backend)
m_backend->versionChangeIgnored();
- return result;
+ return dispatchResult;
}
int64_t IDBDatabase::findObjectStoreId(const String& name) const

Powered by Google App Engine
This is Rietveld 408576698