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

Side by Side Diff: third_party/WebKit/Source/bindings/core/v8/ScriptPromiseResolver.cpp

Issue 2873293002: Replace ASSERT with DCHECK_EQ as appropriate (Closed)
Patch Set: rebase Created 3 years, 7 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/build/scripts/templates/CSSPropertyMetadata.cpp.tmpl » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "bindings/core/v8/ScriptPromiseResolver.h" 5 #include "bindings/core/v8/ScriptPromiseResolver.h"
6 6
7 #include "core/dom/ExecutionContext.h" 7 #include "core/dom/ExecutionContext.h"
8 #include "core/dom/TaskRunnerHelper.h" 8 #include "core/dom/TaskRunnerHelper.h"
9 #include "core/probe/CoreProbes.h" 9 #include "core/probe/CoreProbes.h"
10 10
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 } 69 }
70 70
71 void ScriptPromiseResolver::ResolveOrRejectImmediately() { 71 void ScriptPromiseResolver::ResolveOrRejectImmediately() {
72 DCHECK(!GetExecutionContext()->IsContextDestroyed()); 72 DCHECK(!GetExecutionContext()->IsContextDestroyed());
73 DCHECK(!GetExecutionContext()->IsContextSuspended()); 73 DCHECK(!GetExecutionContext()->IsContextSuspended());
74 { 74 {
75 probe::AsyncTask async_task(GetExecutionContext(), this); 75 probe::AsyncTask async_task(GetExecutionContext(), this);
76 if (state_ == kResolving) { 76 if (state_ == kResolving) {
77 resolver_.Resolve(value_.NewLocal(script_state_->GetIsolate())); 77 resolver_.Resolve(value_.NewLocal(script_state_->GetIsolate()));
78 } else { 78 } else {
79 ASSERT(state_ == kRejecting); 79 DCHECK_EQ(state_, kRejecting);
80 resolver_.Reject(value_.NewLocal(script_state_->GetIsolate())); 80 resolver_.Reject(value_.NewLocal(script_state_->GetIsolate()));
81 } 81 }
82 } 82 }
83 Detach(); 83 Detach();
84 } 84 }
85 85
86 DEFINE_TRACE(ScriptPromiseResolver) { 86 DEFINE_TRACE(ScriptPromiseResolver) {
87 SuspendableObject::Trace(visitor); 87 SuspendableObject::Trace(visitor);
88 } 88 }
89 89
90 } // namespace blink 90 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/build/scripts/templates/CSSPropertyMetadata.cpp.tmpl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698