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

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

Issue 2700123003: DO NOT COMMIT: Results of running old (current) clang-format on Blink (Closed)
Patch Set: Created 3 years, 10 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/dom/TaskRunnerHelper.h" 7 #include "core/dom/TaskRunnerHelper.h"
8 #include "core/inspector/InspectorInstrumentation.h" 8 #include "core/inspector/InspectorInstrumentation.h"
9 9
10 namespace blink { 10 namespace blink {
11 11
12 ScriptPromiseResolver::ScriptPromiseResolver(ScriptState* scriptState) 12 ScriptPromiseResolver::ScriptPromiseResolver(ScriptState* scriptState)
13 : SuspendableObject(scriptState->getExecutionContext()), 13 : SuspendableObject(scriptState->getExecutionContext()),
14 m_state(Pending), 14 m_state(Pending),
15 m_scriptState(scriptState), 15 m_scriptState(scriptState),
16 m_timer(TaskRunnerHelper::get(TaskType::Microtask, getExecutionContext()), 16 m_timer(TaskRunnerHelper::get(TaskType::Microtask, getExecutionContext()),
17 this, 17 this,
18 &ScriptPromiseResolver::onTimerFired), 18 &ScriptPromiseResolver::onTimerFired),
19 m_resolver(scriptState) 19 m_resolver(scriptState) {
20 {
21 if (getExecutionContext()->isContextDestroyed()) { 20 if (getExecutionContext()->isContextDestroyed()) {
22 m_state = Detached; 21 m_state = Detached;
23 m_resolver.clear(); 22 m_resolver.clear();
24 } 23 }
25 InspectorInstrumentation::asyncTaskScheduled(getExecutionContext(), "Promise", 24 InspectorInstrumentation::asyncTaskScheduled(getExecutionContext(), "Promise",
26 this); 25 this);
27 } 26 }
28 27
29 void ScriptPromiseResolver::suspend() { 28 void ScriptPromiseResolver::suspend() {
30 m_timer.stop(); 29 m_timer.stop();
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 } 81 }
83 } 82 }
84 detach(); 83 detach();
85 } 84 }
86 85
87 DEFINE_TRACE(ScriptPromiseResolver) { 86 DEFINE_TRACE(ScriptPromiseResolver) {
88 SuspendableObject::trace(visitor); 87 SuspendableObject::trace(visitor);
89 } 88 }
90 89
91 } // namespace blink 90 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698