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

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

Issue 2801893008: Replace ASSERT, ASSERT_NOT_REACHED, and RELEASE_ASSERT in modules/indexeddb (Closed)
Patch Set: rebase Created 3 years, 8 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/IDBFactory.cpp
diff --git a/third_party/WebKit/Source/modules/indexeddb/IDBFactory.cpp b/third_party/WebKit/Source/modules/indexeddb/IDBFactory.cpp
index 77e09be0b6d191cdd72fb7115fa30be80aa00363..b237d15aae4f3246c78d0d046f07a22d6fcfaf6c 100644
--- a/third_party/WebKit/Source/modules/indexeddb/IDBFactory.cpp
+++ b/third_party/WebKit/Source/modules/indexeddb/IDBFactory.cpp
@@ -54,7 +54,7 @@ static const char kPermissionDeniedErrorMessage[] =
IDBFactory::IDBFactory() {}
static bool IsContextValid(ExecutionContext* context) {
- ASSERT(context->IsDocument() || context->IsWorkerGlobalScope());
+ DCHECK(context->IsDocument() || context->IsWorkerGlobalScope());
if (context->IsDocument()) {
Document* document = ToDocument(context);
return document->GetFrame() && document->GetPage();
@@ -110,7 +110,7 @@ IDBOpenDBRequest* IDBFactory::OpenInternal(ScriptState* script_state,
int64_t version,
ExceptionState& exception_state) {
IDBDatabase::RecordApiCallsHistogram(kIDBOpenCall);
- ASSERT(version >= 1 || version == IDBDatabaseMetadata::kNoVersion);
+ DCHECK(version >= 1 || version == IDBDatabaseMetadata::kNoVersion);
if (!IsContextValid(script_state->GetExecutionContext()))
return nullptr;
if (!script_state->GetExecutionContext()
@@ -207,7 +207,7 @@ short IDBFactory::cmp(ScriptState* script_state,
first_value, exception_state);
if (exception_state.HadException())
return 0;
- ASSERT(first);
+ DCHECK(first);
if (!first->IsValid()) {
exception_state.ThrowDOMException(kDataError,
IDBDatabase::kNotValidKeyErrorMessage);
@@ -218,7 +218,7 @@ short IDBFactory::cmp(ScriptState* script_state,
second_value, exception_state);
if (exception_state.HadException())
return 0;
- ASSERT(second);
+ DCHECK(second);
if (!second->IsValid()) {
exception_state.ThrowDOMException(kDataError,
IDBDatabase::kNotValidKeyErrorMessage);

Powered by Google App Engine
This is Rietveld 408576698