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

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: 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/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 9d8f1cb6acb12c0447c7b9591691c940cdf72d51..53f0134e8763d19bf2abccc35ec37a2aae07b5a7 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,21 @@ class RejectedPromises::Message final {
}
void MakePromiseWeak() {
- ASSERT(!promise_.IsEmpty() && !promise_.IsWeak());
+ DCHECK(!promise_.IsEmpty());
+ DCHECK(!promise_.IsWeak());
promise_.SetWeak(this, &Message::DidCollectPromise);
exception_.SetWeak(this, &Message::DidCollectException);
}
void MakePromiseStrong() {
- ASSERT(!promise_.IsEmpty() && promise_.IsWeak());
+ DCHECK(!promise_.IsEmpty());
+ DCHECK(promise_.IsWeak());
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();
« no previous file with comments | « third_party/WebKit/Source/bindings/core/v8/Iterable.h ('k') | third_party/WebKit/Source/bindings/core/v8/RetainedDOMInfo.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698