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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/ScriptValue.cpp

Issue 2817533003: Replace ASSERT, RELEASE_ASSERT, and ASSERT_NOT_REACHED in bindings (Closed)
Patch Set: fixed dcheck build error 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/bindings/core/v8/ScriptValue.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/ScriptValue.cpp b/third_party/WebKit/Source/bindings/core/v8/ScriptValue.cpp
index d305a058806e292b3e20898d0568ede81e29ba98..cce2cc5ab0ce55cc99e38ff33bc0f5f88f82e1c0 100644
--- a/third_party/WebKit/Source/bindings/core/v8/ScriptValue.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/ScriptValue.cpp
@@ -40,7 +40,7 @@ v8::Local<v8::Value> ScriptValue::V8Value() const {
if (IsEmpty())
return v8::Local<v8::Value>();
- ASSERT(GetIsolate()->InContext());
+ DCHECK(GetIsolate()->InContext());
// This is a check to validate that you don't return a ScriptValue to a world
// different from the world that created the ScriptValue.
@@ -48,8 +48,7 @@ v8::Local<v8::Value> ScriptValue::V8Value() const {
// if (&m_scriptState->world() == &DOMWrapperWorld::current(isolate()))
// return v8::Local<v8::Value>();
// instead of triggering RELEASE_ASSERT.
- RELEASE_ASSERT(&script_state_->World() ==
- &DOMWrapperWorld::Current(GetIsolate()));
+ CHECK_EQ(&script_state_->World(), &DOMWrapperWorld::Current(GetIsolate()));
return value_->NewLocal(GetIsolate());
}
@@ -61,7 +60,7 @@ v8::Local<v8::Value> ScriptValue::V8ValueFor(
if (&script_state_->World() == &target_script_state->World())
return value_->NewLocal(isolate);
- ASSERT(isolate->InContext());
+ DCHECK(isolate->InContext());
v8::Local<v8::Value> value = value_->NewLocal(isolate);
RefPtr<SerializedScriptValue> serialized =
SerializedScriptValue::SerializeAndSwallowExceptions(isolate, value);
« no previous file with comments | « third_party/WebKit/Source/bindings/core/v8/ScriptValue.h ('k') | third_party/WebKit/Source/bindings/core/v8/ScriptWrappable.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698