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

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

Issue 2612523002: Move bindings timers to frame-specific task runners. (Closed)
Patch Set: Created 3 years, 11 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/bindings/core/v8/ScriptPromiseResolver.cpp » ('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 #ifndef ScriptPromiseResolver_h 5 #ifndef ScriptPromiseResolver_h
6 #define ScriptPromiseResolver_h 6 #define ScriptPromiseResolver_h
7 7
8 #include "bindings/core/v8/ScopedPersistent.h" 8 #include "bindings/core/v8/ScopedPersistent.h"
9 #include "bindings/core/v8/ScriptPromise.h" 9 #include "bindings/core/v8/ScriptPromise.h"
10 #include "bindings/core/v8/ScriptState.h" 10 #include "bindings/core/v8/ScriptState.h"
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 return; 146 return;
147 } 147 }
148 resolveOrRejectImmediately(); 148 resolveOrRejectImmediately();
149 } 149 }
150 150
151 void resolveOrRejectImmediately(); 151 void resolveOrRejectImmediately();
152 void onTimerFired(TimerBase*); 152 void onTimerFired(TimerBase*);
153 153
154 ResolutionState m_state; 154 ResolutionState m_state;
155 const RefPtr<ScriptState> m_scriptState; 155 const RefPtr<ScriptState> m_scriptState;
156 Timer<ScriptPromiseResolver> m_timer; 156 TaskRunnerTimer<ScriptPromiseResolver> m_timer;
157 Resolver m_resolver; 157 Resolver m_resolver;
158 ScopedPersistent<v8::Value> m_value; 158 ScopedPersistent<v8::Value> m_value;
159 159
160 // To support keepAliveWhilePending(), this object needs to keep itself 160 // To support keepAliveWhilePending(), this object needs to keep itself
161 // alive while in that state. 161 // alive while in that state.
162 SelfKeepAlive<ScriptPromiseResolver> m_keepAlive; 162 SelfKeepAlive<ScriptPromiseResolver> m_keepAlive;
163 163
164 #if ENABLE(ASSERT) 164 #if ENABLE(ASSERT)
165 // True if promise() is called. 165 // True if promise() is called.
166 bool m_isPromiseCalled; 166 bool m_isPromiseCalled;
167 #endif 167 #endif
168 }; 168 };
169 169
170 } // namespace blink 170 } // namespace blink
171 171
172 #endif // ScriptPromiseResolver_h 172 #endif // ScriptPromiseResolver_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/bindings/core/v8/ScriptPromiseResolver.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698