| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |