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

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

Issue 397733004: Allow assertions to be enabled in Blink Release builds. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased. Created 6 years, 5 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
« no previous file with comments | « Source/modules/indexeddb/IDBKeyPath.cpp ('k') | Source/modules/webdatabase/DatabaseSync.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/indexeddb/IDBRequest.cpp
diff --git a/Source/modules/indexeddb/IDBRequest.cpp b/Source/modules/indexeddb/IDBRequest.cpp
index 16992b32ade0174816e1f35db0e4ff8a6bd849fd..2694e21cac01e6cd90ab6ea35884d972b71e6b52 100644
--- a/Source/modules/indexeddb/IDBRequest.cpp
+++ b/Source/modules/indexeddb/IDBRequest.cpp
@@ -303,7 +303,7 @@ void IDBRequest::onSuccess(PassRefPtr<SharedBuffer> valueBuffer, PassOwnPtr<Vect
onSuccessInternal(IDBAny::create(valueBuffer, m_blobInfo.get()));
}
-#ifndef NDEBUG
+#if ENABLE(ASSERT)
static IDBObjectStore* effectiveObjectStore(IDBAny* source)
{
if (source->type() == IDBAny::IDBObjectStoreType)
@@ -322,16 +322,14 @@ void IDBRequest::onSuccess(PassRefPtr<SharedBuffer> prpValueBuffer, PassOwnPtr<V
if (!shouldEnqueueEvent())
return;
-#ifndef NDEBUG
ASSERT(keyPath == effectiveObjectStore(m_source)->metadata().keyPath);
-#endif
RefPtr<SharedBuffer> valueBuffer = prpValueBuffer;
IDBKey* primaryKey = prpPrimaryKey;
ASSERT(!m_blobInfo.get());
m_blobInfo = blobInfo;
-#ifndef NDEBUG
+#if ENABLE(ASSERT)
assertPrimaryKeyValidOrInjectable(m_scriptState.get(), valueBuffer, m_blobInfo.get(), primaryKey, keyPath);
#endif
« no previous file with comments | « Source/modules/indexeddb/IDBKeyPath.cpp ('k') | Source/modules/webdatabase/DatabaseSync.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698