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

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

Issue 2817533003: Replace ASSERT, RELEASE_ASSERT, and ASSERT_NOT_REACHED in bindings (Closed)
Patch Set: 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/RejectedPromises.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/RejectedPromises.cpp b/third_party/WebKit/Source/bindings/core/v8/RejectedPromises.cpp
index a0d74b0babff2c7814533d82f8060f3218953af4..51caff3ab7f154a0fa20d9f9967a84d3f8904a5b 100644
--- a/third_party/WebKit/Source/bindings/core/v8/RejectedPromises.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/RejectedPromises.cpp
@@ -63,7 +63,7 @@ class RejectedPromises::Message final {
// Either collected or https://crbug.com/450330
if (value.IsEmpty() || !value->IsPromise())
return;
- ASSERT(!HasHandler());
+ DCHECK(!HasHandler());
EventTarget* target = execution_context->ErrorEventTarget();
if (target && !execution_context->ShouldSanitizeScriptError(resource_name_,
@@ -127,19 +127,19 @@ class RejectedPromises::Message final {
}
void MakePromiseWeak() {
- ASSERT(!promise_.IsEmpty() && !promise_.IsWeak());
+ DCHECK(!promise_.IsEmpty() && !promise_.IsWeak());
tkent 2017/04/13 05:37:16 Split this into two DCHECKs. DCHECK(!promise_.IsE
bhagirathi.s 2017/04/13 09:10:35 Done.
promise_.SetWeak(this, &Message::DidCollectPromise);
exception_.SetWeak(this, &Message::DidCollectException);
}
void MakePromiseStrong() {
- ASSERT(!promise_.IsEmpty() && promise_.IsWeak());
+ DCHECK(!promise_.IsEmpty() && promise_.IsWeak());
tkent 2017/04/13 05:37:16 Ditto.
bhagirathi.s 2017/04/13 09:10:35 Done.
promise_.ClearWeak();
exception_.ClearWeak();
}
bool HasHandler() {
- ASSERT(!IsCollected());
+ DCHECK(!IsCollected());
ScriptState::Scope scope(script_state_);
v8::Local<v8::Value> value = promise_.NewLocal(script_state_->GetIsolate());
return v8::Local<v8::Promise>::Cast(value)->HasHandler();

Powered by Google App Engine
This is Rietveld 408576698