OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 25 matching lines...) Expand all Loading... |
36 #include "gin/public/v8_idle_task_runner.h" | 36 #include "gin/public/v8_idle_task_runner.h" |
37 #include "platform/heap/Handle.h" | 37 #include "platform/heap/Handle.h" |
38 #include "wtf/HashMap.h" | 38 #include "wtf/HashMap.h" |
39 #include "wtf/Noncopyable.h" | 39 #include "wtf/Noncopyable.h" |
40 #include "wtf/Vector.h" | 40 #include "wtf/Vector.h" |
41 #include <memory> | 41 #include <memory> |
42 #include <v8.h> | 42 #include <v8.h> |
43 | 43 |
44 namespace blink { | 44 namespace blink { |
45 | 45 |
46 class ActiveScriptWrappable; | 46 class ActiveScriptWrappableBase; |
47 class DOMDataStore; | 47 class DOMDataStore; |
48 class StringCache; | 48 class StringCache; |
49 class ThreadDebugger; | 49 class ThreadDebugger; |
50 class V8PrivateProperty; | 50 class V8PrivateProperty; |
51 struct WrapperTypeInfo; | 51 struct WrapperTypeInfo; |
52 | 52 |
53 typedef WTF::Vector<DOMDataStore*> DOMDataStoreList; | 53 typedef WTF::Vector<DOMDataStore*> DOMDataStoreList; |
54 | 54 |
55 class CORE_EXPORT V8PerIsolateData { | 55 class CORE_EXPORT V8PerIsolateData { |
56 USING_FAST_MALLOC(V8PerIsolateData); | 56 USING_FAST_MALLOC(V8PerIsolateData); |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 // event) or microtasks (e.g. promise). This is explicitly needed for | 153 // event) or microtasks (e.g. promise). This is explicitly needed for |
154 // Indexed DB transactions per spec, but should in general be avoided. | 154 // Indexed DB transactions per spec, but should in general be avoided. |
155 void addEndOfScopeTask(std::unique_ptr<EndOfScopeTask>); | 155 void addEndOfScopeTask(std::unique_ptr<EndOfScopeTask>); |
156 void runEndOfScopeTasks(); | 156 void runEndOfScopeTasks(); |
157 void clearEndOfScopeTasks(); | 157 void clearEndOfScopeTasks(); |
158 | 158 |
159 void setThreadDebugger(std::unique_ptr<ThreadDebugger>); | 159 void setThreadDebugger(std::unique_ptr<ThreadDebugger>); |
160 ThreadDebugger* threadDebugger(); | 160 ThreadDebugger* threadDebugger(); |
161 | 161 |
162 using ActiveScriptWrappableSet = | 162 using ActiveScriptWrappableSet = |
163 HeapHashSet<WeakMember<ActiveScriptWrappable>>; | 163 HeapHashSet<WeakMember<ActiveScriptWrappableBase>>; |
164 void addActiveScriptWrappable(ActiveScriptWrappable*); | 164 void addActiveScriptWrappable(ActiveScriptWrappableBase*); |
165 const ActiveScriptWrappableSet* activeScriptWrappables() const { | 165 const ActiveScriptWrappableSet* activeScriptWrappables() const { |
166 return m_activeScriptWrappables.get(); | 166 return m_activeScriptWrappables.get(); |
167 } | 167 } |
168 | 168 |
169 void setScriptWrappableVisitor( | 169 void setScriptWrappableVisitor( |
170 std::unique_ptr<ScriptWrappableVisitor> visitor) { | 170 std::unique_ptr<ScriptWrappableVisitor> visitor) { |
171 m_scriptWrappableVisitor = std::move(visitor); | 171 m_scriptWrappableVisitor = std::move(visitor); |
172 } | 172 } |
173 ScriptWrappableVisitor* scriptWrappableVisitor() { | 173 ScriptWrappableVisitor* scriptWrappableVisitor() { |
174 return m_scriptWrappableVisitor.get(); | 174 return m_scriptWrappableVisitor.get(); |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 Vector<std::unique_ptr<EndOfScopeTask>> m_endOfScopeTasks; | 220 Vector<std::unique_ptr<EndOfScopeTask>> m_endOfScopeTasks; |
221 std::unique_ptr<ThreadDebugger> m_threadDebugger; | 221 std::unique_ptr<ThreadDebugger> m_threadDebugger; |
222 | 222 |
223 Persistent<ActiveScriptWrappableSet> m_activeScriptWrappables; | 223 Persistent<ActiveScriptWrappableSet> m_activeScriptWrappables; |
224 std::unique_ptr<ScriptWrappableVisitor> m_scriptWrappableVisitor; | 224 std::unique_ptr<ScriptWrappableVisitor> m_scriptWrappableVisitor; |
225 }; | 225 }; |
226 | 226 |
227 } // namespace blink | 227 } // namespace blink |
228 | 228 |
229 #endif // V8PerIsolateData_h | 229 #endif // V8PerIsolateData_h |
OLD | NEW |