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 PromiseTracker_h | 5 #ifndef PromiseTracker_h |
6 #define PromiseTracker_h | 6 #define PromiseTracker_h |
7 | 7 |
8 #include "bindings/core/v8/V8GlobalValueMap.h" | 8 #include "bindings/core/v8/V8GlobalValueMap.h" |
9 #include "core/CoreExport.h" | 9 #include "core/CoreExport.h" |
10 #include "core/InspectorFrontend.h" | 10 #include "core/InspectorFrontend.h" |
11 #include "core/InspectorTypeBuilder.h" | 11 #include "core/InspectorTypeBuilder.h" |
12 #include "platform/heap/Handle.h" | 12 #include "platform/heap/Handle.h" |
13 #include "wtf/HashMap.h" | 13 #include "wtf/HashMap.h" |
14 #include "wtf/Noncopyable.h" | 14 #include "wtf/Noncopyable.h" |
15 #include "wtf/RefPtr.h" | 15 #include "wtf/RefPtr.h" |
16 #include "wtf/Vector.h" | 16 #include "wtf/Vector.h" |
17 #include <v8.h> | 17 #include <v8.h> |
18 | 18 |
19 namespace blink { | 19 namespace blink { |
20 | 20 |
21 class ScriptState; | 21 class ScriptState; |
22 class ScriptValue; | 22 class ScriptValue; |
23 | 23 |
24 class PromiseTracker final : public NoBaseWillBeGarbageCollectedFinalized<Promis
eTracker> { | 24 class PromiseTracker final : public NoBaseWillBeGarbageCollectedFinalized<Promis
eTracker> { |
25 WTF_MAKE_NONCOPYABLE(PromiseTracker); | 25 WTF_MAKE_NONCOPYABLE(PromiseTracker); |
| 26 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED(PromiseTracker); |
26 public: | 27 public: |
27 class CORE_EXPORT Listener : public WillBeGarbageCollectedMixin { | 28 class CORE_EXPORT Listener : public WillBeGarbageCollectedMixin { |
28 public: | 29 public: |
29 virtual ~Listener() { } | 30 virtual ~Listener() { } |
30 virtual void didUpdatePromise(InspectorFrontend::Debugger::EventType::En
um, PassRefPtr<TypeBuilder::Debugger::PromiseDetails>) = 0; | 31 virtual void didUpdatePromise(InspectorFrontend::Debugger::EventType::En
um, PassRefPtr<TypeBuilder::Debugger::PromiseDetails>) = 0; |
31 }; | 32 }; |
32 | 33 |
33 static PassOwnPtrWillBeRawPtr<PromiseTracker> create(Listener* listener, v8:
:Isolate* isolate) | 34 static PassOwnPtrWillBeRawPtr<PromiseTracker> create(Listener* listener, v8:
:Isolate* isolate) |
34 { | 35 { |
35 return adoptPtrWillBeNoop(new PromiseTracker(listener, isolate)); | 36 return adoptPtrWillBeNoop(new PromiseTracker(listener, isolate)); |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 static MapType* MapFromWeakCallbackInfo(const v8::WeakCallbackInfo<WeakC
allbackDataType>&); | 81 static MapType* MapFromWeakCallbackInfo(const v8::WeakCallbackInfo<WeakC
allbackDataType>&); |
81 static int KeyFromWeakCallbackInfo(const v8::WeakCallbackInfo<WeakCallba
ckDataType>&); | 82 static int KeyFromWeakCallbackInfo(const v8::WeakCallbackInfo<WeakCallba
ckDataType>&); |
82 }; | 83 }; |
83 | 84 |
84 IdToPromiseMapTraits::MapType m_idToPromise; | 85 IdToPromiseMapTraits::MapType m_idToPromise; |
85 }; | 86 }; |
86 | 87 |
87 } // namespace blink | 88 } // namespace blink |
88 | 89 |
89 #endif // !defined(PromiseTracker_h) | 90 #endif // !defined(PromiseTracker_h) |
OLD | NEW |