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

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 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/IDBDatabase.cpp
diff --git a/third_party/WebKit/Source/modules/indexeddb/IDBDatabase.cpp b/third_party/WebKit/Source/modules/indexeddb/IDBDatabase.cpp
index 6c10af97906c4478cec0e55e659354e09655d91a..b5defd21f02a579b2dec20e70e899b9cca48362f 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