| 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 "config.h" | 5 #include "config.h" |
| 6 #include "core/inspector/PromiseTracker.h" | 6 #include "core/inspector/PromiseTracker.h" |
| 7 | 7 |
| 8 #include "bindings/core/v8/ScriptCallStackFactory.h" | 8 #include "bindings/core/v8/ScriptCallStackFactory.h" |
| 9 #include "bindings/core/v8/ScriptState.h" | 9 #include "bindings/core/v8/ScriptState.h" |
| 10 #include "bindings/core/v8/ScriptValue.h" | 10 #include "bindings/core/v8/ScriptValue.h" |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 , m_isEnabled(false) | 74 , m_isEnabled(false) |
| 75 , m_captureStacks(false) | 75 , m_captureStacks(false) |
| 76 , m_listener(listener) | 76 , m_listener(listener) |
| 77 , m_isolate(isolate) | 77 , m_isolate(isolate) |
| 78 , m_weakPtrFactory(this) | 78 , m_weakPtrFactory(this) |
| 79 , m_idToPromise(isolate) | 79 , m_idToPromise(isolate) |
| 80 { | 80 { |
| 81 clear(); | 81 clear(); |
| 82 } | 82 } |
| 83 | 83 |
| 84 DEFINE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(PromiseTracker); | 84 PromiseTracker::~PromiseTracker() |
| 85 { |
| 86 } |
| 85 | 87 |
| 86 DEFINE_TRACE(PromiseTracker) | 88 DEFINE_TRACE(PromiseTracker) |
| 87 { | 89 { |
| 88 #if ENABLE(OILPAN) | 90 #if ENABLE(OILPAN) |
| 89 visitor->trace(m_listener); | 91 visitor->trace(m_listener); |
| 90 #endif | 92 #endif |
| 91 } | 93 } |
| 92 | 94 |
| 93 void PromiseTracker::setEnabled(bool enabled, bool captureStacks) | 95 void PromiseTracker::setEnabled(bool enabled, bool captureStacks) |
| 94 { | 96 { |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 { | 198 { |
| 197 ASSERT(isEnabled()); | 199 ASSERT(isEnabled()); |
| 198 v8::HandleScope scope(m_isolate); | 200 v8::HandleScope scope(m_isolate); |
| 199 v8::Local<v8::Object> value = m_idToPromise.Get(promiseId); | 201 v8::Local<v8::Object> value = m_idToPromise.Get(promiseId); |
| 200 if (value.IsEmpty()) | 202 if (value.IsEmpty()) |
| 201 return ScriptValue(); | 203 return ScriptValue(); |
| 202 return ScriptValue(ScriptState::from(value->CreationContext()) , value); | 204 return ScriptValue(ScriptState::from(value->CreationContext()) , value); |
| 203 } | 205 } |
| 204 | 206 |
| 205 } // namespace blink | 207 } // namespace blink |
| OLD | NEW |