| 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 #include "bindings/core/v8/ScriptPromisePropertyBase.h" | 5 #include "bindings/core/v8/ScriptPromisePropertyBase.h" |
| 6 | 6 |
| 7 #include "bindings/core/v8/ScopedPersistent.h" | 7 #include "bindings/core/v8/ScopedPersistent.h" |
| 8 #include "bindings/core/v8/ScriptState.h" | 8 #include "bindings/core/v8/ScriptState.h" |
| 9 #include "bindings/core/v8/V8Binding.h" | 9 #include "bindings/core/v8/V8Binding.h" |
| 10 #include "bindings/core/v8/V8HiddenValue.h" | 10 #include "bindings/core/v8/V8HiddenValue.h" |
| 11 #include "core/dom/ExecutionContext.h" | 11 #include "core/dom/ExecutionContext.h" |
| 12 #include "wtf/PtrUtil.h" | 12 #include "wtf/PtrUtil.h" |
| 13 #include <memory> | 13 #include <memory> |
| 14 | 14 |
| 15 namespace blink { | 15 namespace blink { |
| 16 | 16 |
| 17 ScriptPromisePropertyBase::ScriptPromisePropertyBase( | 17 ScriptPromisePropertyBase::ScriptPromisePropertyBase( |
| 18 ExecutionContext* executionContext, | 18 ExecutionContext* executionContext, |
| 19 Name name) | 19 Name name) |
| 20 : ContextLifecycleObserver(executionContext), | 20 : ContextClient(executionContext), |
| 21 m_isolate(toIsolate(executionContext)), | 21 m_isolate(toIsolate(executionContext)), |
| 22 m_name(name), | 22 m_name(name), |
| 23 m_state(Pending) {} | 23 m_state(Pending) {} |
| 24 | 24 |
| 25 ScriptPromisePropertyBase::~ScriptPromisePropertyBase() { | 25 ScriptPromisePropertyBase::~ScriptPromisePropertyBase() { |
| 26 clearWrappers(); | 26 clearWrappers(); |
| 27 } | 27 } |
| 28 | 28 |
| 29 ScriptPromise ScriptPromisePropertyBase::promise(DOMWrapperWorld& world) { | 29 ScriptPromise ScriptPromisePropertyBase::promise(DOMWrapperWorld& world) { |
| 30 if (!getExecutionContext()) | 30 if (!getExecutionContext()) |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 | 200 |
| 201 SCRIPT_PROMISE_PROPERTIES(P) | 201 SCRIPT_PROMISE_PROPERTIES(P) |
| 202 | 202 |
| 203 #undef P | 203 #undef P |
| 204 } | 204 } |
| 205 ASSERT_NOT_REACHED(); | 205 ASSERT_NOT_REACHED(); |
| 206 return v8::Local<v8::String>(); | 206 return v8::Local<v8::String>(); |
| 207 } | 207 } |
| 208 | 208 |
| 209 DEFINE_TRACE(ScriptPromisePropertyBase) { | 209 DEFINE_TRACE(ScriptPromisePropertyBase) { |
| 210 ContextLifecycleObserver::trace(visitor); | 210 ContextClient::trace(visitor); |
| 211 } | 211 } |
| 212 | 212 |
| 213 } // namespace blink | 213 } // namespace blink |
| OLD | NEW |