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 13 matching lines...) Expand all Loading... |
24 */ | 24 */ |
25 | 25 |
26 #ifndef V8PerIsolateData_h | 26 #ifndef V8PerIsolateData_h |
27 #define V8PerIsolateData_h | 27 #define V8PerIsolateData_h |
28 | 28 |
29 #include <memory> | 29 #include <memory> |
30 | 30 |
31 #include "bindings/core/v8/ScopedPersistent.h" | 31 #include "bindings/core/v8/ScopedPersistent.h" |
32 #include "bindings/core/v8/ScriptState.h" | 32 #include "bindings/core/v8/ScriptState.h" |
33 #include "bindings/core/v8/ScriptWrappableVisitor.h" | 33 #include "bindings/core/v8/ScriptWrappableVisitor.h" |
34 #include "bindings/core/v8/V8HiddenValue.h" | |
35 #include "bindings/core/v8/WrapperTypeInfo.h" | 34 #include "bindings/core/v8/WrapperTypeInfo.h" |
36 #include "core/CoreExport.h" | 35 #include "core/CoreExport.h" |
37 #include "gin/public/isolate_holder.h" | 36 #include "gin/public/isolate_holder.h" |
38 #include "gin/public/v8_idle_task_runner.h" | 37 #include "gin/public/v8_idle_task_runner.h" |
39 #include "platform/heap/Handle.h" | 38 #include "platform/heap/Handle.h" |
40 #include "platform/wtf/HashMap.h" | 39 #include "platform/wtf/HashMap.h" |
41 #include "platform/wtf/Noncopyable.h" | 40 #include "platform/wtf/Noncopyable.h" |
42 #include "platform/wtf/Vector.h" | 41 #include "platform/wtf/Vector.h" |
43 #include "v8/include/v8.h" | 42 #include "v8/include/v8.h" |
44 | 43 |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 } | 124 } |
126 void setIsHandlingRecursionLevelError(bool value) { | 125 void setIsHandlingRecursionLevelError(bool value) { |
127 m_isHandlingRecursionLevelError = value; | 126 m_isHandlingRecursionLevelError = value; |
128 } | 127 } |
129 | 128 |
130 bool isReportingException() const { return m_isReportingException; } | 129 bool isReportingException() const { return m_isReportingException; } |
131 void setReportingException(bool value) { m_isReportingException = value; } | 130 void setReportingException(bool value) { m_isReportingException = value; } |
132 | 131 |
133 bool isUseCounterDisabled() const { return m_useCounterDisabled; } | 132 bool isUseCounterDisabled() const { return m_useCounterDisabled; } |
134 | 133 |
135 V8HiddenValue* hiddenValue() { return m_hiddenValue.get(); } | |
136 V8PrivateProperty* privateProperty() { return m_privateProperty.get(); } | 134 V8PrivateProperty* privateProperty() { return m_privateProperty.get(); } |
137 | 135 |
138 // Accessors to the cache of interface templates. | 136 // Accessors to the cache of interface templates. |
139 v8::Local<v8::FunctionTemplate> findInterfaceTemplate(const DOMWrapperWorld&, | 137 v8::Local<v8::FunctionTemplate> findInterfaceTemplate(const DOMWrapperWorld&, |
140 const void* key); | 138 const void* key); |
141 void setInterfaceTemplate(const DOMWrapperWorld&, | 139 void setInterfaceTemplate(const DOMWrapperWorld&, |
142 const void* key, | 140 const void* key, |
143 v8::Local<v8::FunctionTemplate>); | 141 v8::Local<v8::FunctionTemplate>); |
144 | 142 |
145 // Accessor to the cache of cross-origin accessible operation's templates. | 143 // Accessor to the cache of cross-origin accessible operation's templates. |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
244 V8FunctionTemplateMap m_interfaceTemplateMapForNonMainWorld; | 242 V8FunctionTemplateMap m_interfaceTemplateMapForNonMainWorld; |
245 // m_operationTemplateMapFor{,Non}MainWorld holds function templates for | 243 // m_operationTemplateMapFor{,Non}MainWorld holds function templates for |
246 // the cross-origin accessible DOM operations. | 244 // the cross-origin accessible DOM operations. |
247 V8FunctionTemplateMap m_operationTemplateMapForMainWorld; | 245 V8FunctionTemplateMap m_operationTemplateMapForMainWorld; |
248 V8FunctionTemplateMap m_operationTemplateMapForNonMainWorld; | 246 V8FunctionTemplateMap m_operationTemplateMapForNonMainWorld; |
249 | 247 |
250 // Contains lists of eternal names, such as dictionary keys. | 248 // Contains lists of eternal names, such as dictionary keys. |
251 HashMap<const void*, Vector<v8::Eternal<v8::Name>>> m_eternalNameCache; | 249 HashMap<const void*, Vector<v8::Eternal<v8::Name>>> m_eternalNameCache; |
252 | 250 |
253 std::unique_ptr<StringCache> m_stringCache; | 251 std::unique_ptr<StringCache> m_stringCache; |
254 std::unique_ptr<V8HiddenValue> m_hiddenValue; | |
255 std::unique_ptr<V8PrivateProperty> m_privateProperty; | 252 std::unique_ptr<V8PrivateProperty> m_privateProperty; |
256 ScopedPersistent<v8::Value> m_liveRoot; | 253 ScopedPersistent<v8::Value> m_liveRoot; |
257 RefPtr<ScriptState> m_scriptRegexpScriptState; | 254 RefPtr<ScriptState> m_scriptRegexpScriptState; |
258 | 255 |
259 bool m_constructorMode; | 256 bool m_constructorMode; |
260 friend class ConstructorMode; | 257 friend class ConstructorMode; |
261 | 258 |
262 bool m_useCounterDisabled; | 259 bool m_useCounterDisabled; |
263 friend class UseCounterDisabledScope; | 260 friend class UseCounterDisabledScope; |
264 | 261 |
265 bool m_isHandlingRecursionLevelError; | 262 bool m_isHandlingRecursionLevelError; |
266 bool m_isReportingException; | 263 bool m_isReportingException; |
267 | 264 |
268 Vector<std::unique_ptr<EndOfScopeTask>> m_endOfScopeTasks; | 265 Vector<std::unique_ptr<EndOfScopeTask>> m_endOfScopeTasks; |
269 std::unique_ptr<Data> m_threadDebugger; | 266 std::unique_ptr<Data> m_threadDebugger; |
270 | 267 |
271 Persistent<ActiveScriptWrappableSet> m_activeScriptWrappables; | 268 Persistent<ActiveScriptWrappableSet> m_activeScriptWrappables; |
272 std::unique_ptr<ScriptWrappableVisitor> m_scriptWrappableVisitor; | 269 std::unique_ptr<ScriptWrappableVisitor> m_scriptWrappableVisitor; |
273 }; | 270 }; |
274 | 271 |
275 } // namespace blink | 272 } // namespace blink |
276 | 273 |
277 #endif // V8PerIsolateData_h | 274 #endif // V8PerIsolateData_h |
OLD | NEW |