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

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

Issue 2349413002: Minor IndexedDB refactorings. (Closed)
Patch Set: Created 4 years, 3 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/IDBRequest.cpp
diff --git a/third_party/WebKit/Source/modules/indexeddb/IDBRequest.cpp b/third_party/WebKit/Source/modules/indexeddb/IDBRequest.cpp
index 4a5d672b23d772a072cff20f414c017eabe56394..f36666aa4e0f7bd61c075605caedd94b2240f9e6 100644
--- a/third_party/WebKit/Source/modules/indexeddb/IDBRequest.cpp
+++ b/third_party/WebKit/Source/modules/indexeddb/IDBRequest.cpp
@@ -325,7 +325,7 @@ void IDBRequest::onSuccess(PassRefPtr<IDBValue> prpValue)
#if ENABLE(ASSERT)
cmumford 2016/09/19 23:26:48 If switching to DCHECK should you also switch to:
pwnall 2016/09/20 09:11:14 Done. I also did a bunch more ASSERT->DCHECK chan
if (value->primaryKey()) {
- ASSERT(value->keyPath() == effectiveObjectStore(m_source)->metadata().keyPath);
+ DCHECK(value->keyPath() == effectiveObjectStore(m_source)->idbKeyPath());
assertPrimaryKeyValidOrInjectable(m_scriptState.get(), value.get());
}
#endif
@@ -420,10 +420,10 @@ DispatchEventResult IDBRequest::dispatchEventInternal(Event* event)
IDB_TRACE("IDBRequest::dispatchEvent");
if (m_contextStopped || !getExecutionContext())
return DispatchEventResult::CanceledBeforeDispatch;
- ASSERT(m_readyState == PENDING);
- ASSERT(m_hasPendingActivity);
- ASSERT(m_enqueuedEvents.size());
- ASSERT(event->target() == this);
+ DCHECK_EQ(m_readyState, PENDING);
+ DCHECK(m_hasPendingActivity);
+ DCHECK(m_enqueuedEvents.size());
+ DCHECK_EQ(event->target(), this);
ScriptState::Scope scope(m_scriptState.get());
@@ -451,7 +451,7 @@ DispatchEventResult IDBRequest::dispatchEventInternal(Event* event)
}
if (event->type() == EventTypeNames::upgradeneeded) {
- ASSERT(!m_didFireUpgradeNeededEvent);
+ DCHECK(!m_didFireUpgradeNeededEvent);
m_didFireUpgradeNeededEvent = true;
}

Powered by Google App Engine
This is Rietveld 408576698