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

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

Issue 2587913002: Rename activeDOMObjectsAreSuspended to isContextSuspended (Closed)
Patch Set: temp Created 3 years, 12 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
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/inspector/InspectorInstrumentation.h" 7 #include "core/inspector/InspectorInstrumentation.h"
8 8
9 namespace blink { 9 namespace blink {
10 10
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 detach(); 65 detach();
66 return; 66 return;
67 } 67 }
68 68
69 ScriptState::Scope scope(m_scriptState.get()); 69 ScriptState::Scope scope(m_scriptState.get());
70 resolveOrRejectImmediately(); 70 resolveOrRejectImmediately();
71 } 71 }
72 72
73 void ScriptPromiseResolver::resolveOrRejectImmediately() { 73 void ScriptPromiseResolver::resolveOrRejectImmediately() {
74 DCHECK(!getExecutionContext()->isContextDestroyed()); 74 DCHECK(!getExecutionContext()->isContextDestroyed());
75 DCHECK(!getExecutionContext()->activeDOMObjectsAreSuspended()); 75 DCHECK(!getExecutionContext()->isContextSuspended());
76 { 76 {
77 InspectorInstrumentation::AsyncTask asyncTask(getExecutionContext(), this); 77 InspectorInstrumentation::AsyncTask asyncTask(getExecutionContext(), this);
78 if (m_state == Resolving) { 78 if (m_state == Resolving) {
79 m_resolver.resolve(m_value.newLocal(m_scriptState->isolate())); 79 m_resolver.resolve(m_value.newLocal(m_scriptState->isolate()));
80 } else { 80 } else {
81 ASSERT(m_state == Rejecting); 81 ASSERT(m_state == Rejecting);
82 m_resolver.reject(m_value.newLocal(m_scriptState->isolate())); 82 m_resolver.reject(m_value.newLocal(m_scriptState->isolate()));
83 } 83 }
84 } 84 }
85 detach(); 85 detach();
86 } 86 }
87 87
88 DEFINE_TRACE(ScriptPromiseResolver) { 88 DEFINE_TRACE(ScriptPromiseResolver) {
89 SuspendableObject::trace(visitor); 89 SuspendableObject::trace(visitor);
90 } 90 }
91 91
92 } // namespace blink 92 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698