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 26 matching lines...) Expand all Loading... |
37 #include "wtf/HashMap.h" | 37 #include "wtf/HashMap.h" |
38 #include "wtf/Noncopyable.h" | 38 #include "wtf/Noncopyable.h" |
39 #include "wtf/OwnPtr.h" | 39 #include "wtf/OwnPtr.h" |
40 #include "wtf/Vector.h" | 40 #include "wtf/Vector.h" |
41 #include <v8.h> | 41 #include <v8.h> |
42 | 42 |
43 namespace blink { | 43 namespace blink { |
44 | 44 |
45 class ActiveScriptWrappable; | 45 class ActiveScriptWrappable; |
46 class DOMDataStore; | 46 class DOMDataStore; |
| 47 class StringCache; |
47 class ThreadDebugger; | 48 class ThreadDebugger; |
48 class StringCache; | 49 class V8PrivateProperty; |
49 struct WrapperTypeInfo; | 50 struct WrapperTypeInfo; |
50 | 51 |
51 typedef WTF::Vector<DOMDataStore*> DOMDataStoreList; | 52 typedef WTF::Vector<DOMDataStore*> DOMDataStoreList; |
52 | 53 |
53 class CORE_EXPORT V8PerIsolateData { | 54 class CORE_EXPORT V8PerIsolateData { |
54 USING_FAST_MALLOC(V8PerIsolateData); | 55 USING_FAST_MALLOC(V8PerIsolateData); |
55 WTF_MAKE_NONCOPYABLE(V8PerIsolateData); | 56 WTF_MAKE_NONCOPYABLE(V8PerIsolateData); |
56 public: | 57 public: |
57 class EndOfScopeTask { | 58 class EndOfScopeTask { |
58 USING_FAST_MALLOC(EndOfScopeTask); | 59 USING_FAST_MALLOC(EndOfScopeTask); |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 | 108 |
108 v8::Persistent<v8::Value>& ensureLiveRoot(); | 109 v8::Persistent<v8::Value>& ensureLiveRoot(); |
109 | 110 |
110 bool isHandlingRecursionLevelError() const { return m_isHandlingRecursionLev
elError; } | 111 bool isHandlingRecursionLevelError() const { return m_isHandlingRecursionLev
elError; } |
111 void setIsHandlingRecursionLevelError(bool value) { m_isHandlingRecursionLev
elError = value; } | 112 void setIsHandlingRecursionLevelError(bool value) { m_isHandlingRecursionLev
elError = value; } |
112 | 113 |
113 bool isReportingException() const { return m_isReportingException; } | 114 bool isReportingException() const { return m_isReportingException; } |
114 void setReportingException(bool value) { m_isReportingException = value; } | 115 void setReportingException(bool value) { m_isReportingException = value; } |
115 | 116 |
116 V8HiddenValue* hiddenValue() { return m_hiddenValue.get(); } | 117 V8HiddenValue* hiddenValue() { return m_hiddenValue.get(); } |
| 118 V8PrivateProperty* privateProperty() { return m_privateProperty.get(); } |
117 | 119 |
118 // Accessors to the cache of interface templates. | 120 // Accessors to the cache of interface templates. |
119 v8::Local<v8::FunctionTemplate> findInterfaceTemplate(const DOMWrapperWorld&
, const void* key); | 121 v8::Local<v8::FunctionTemplate> findInterfaceTemplate(const DOMWrapperWorld&
, const void* key); |
120 void setInterfaceTemplate(const DOMWrapperWorld&, const void* key, v8::Local
<v8::FunctionTemplate>); | 122 void setInterfaceTemplate(const DOMWrapperWorld&, const void* key, v8::Local
<v8::FunctionTemplate>); |
121 | 123 |
122 // Accessor to the cache of cross-origin accessible operation's templates. | 124 // Accessor to the cache of cross-origin accessible operation's templates. |
123 // Created templates get automatically cached. | 125 // Created templates get automatically cached. |
124 v8::Local<v8::FunctionTemplate> findOrCreateOperationTemplate(const DOMWrapp
erWorld&, const void* key, v8::FunctionCallback, v8::Local<v8::Value> data, v8::
Local<v8::Signature>, int length); | 126 v8::Local<v8::FunctionTemplate> findOrCreateOperationTemplate(const DOMWrapp
erWorld&, const void* key, v8::FunctionCallback, v8::Local<v8::Value> data, v8::
Local<v8::Signature>, int length); |
125 | 127 |
126 bool hasInstance(const WrapperTypeInfo* untrusted, v8::Local<v8::Value>); | 128 bool hasInstance(const WrapperTypeInfo* untrusted, v8::Local<v8::Value>); |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 // the inerface objects. | 164 // the inerface objects. |
163 V8FunctionTemplateMap m_interfaceTemplateMapForMainWorld; | 165 V8FunctionTemplateMap m_interfaceTemplateMapForMainWorld; |
164 V8FunctionTemplateMap m_interfaceTemplateMapForNonMainWorld; | 166 V8FunctionTemplateMap m_interfaceTemplateMapForNonMainWorld; |
165 // m_operationTemplateMapFor{,Non}MainWorld holds function templates for | 167 // m_operationTemplateMapFor{,Non}MainWorld holds function templates for |
166 // the cross-origin accessible DOM operations. | 168 // the cross-origin accessible DOM operations. |
167 V8FunctionTemplateMap m_operationTemplateMapForMainWorld; | 169 V8FunctionTemplateMap m_operationTemplateMapForMainWorld; |
168 V8FunctionTemplateMap m_operationTemplateMapForNonMainWorld; | 170 V8FunctionTemplateMap m_operationTemplateMapForNonMainWorld; |
169 | 171 |
170 OwnPtr<StringCache> m_stringCache; | 172 OwnPtr<StringCache> m_stringCache; |
171 OwnPtr<V8HiddenValue> m_hiddenValue; | 173 OwnPtr<V8HiddenValue> m_hiddenValue; |
| 174 std::unique_ptr<V8PrivateProperty> m_privateProperty; |
172 ScopedPersistent<v8::Value> m_liveRoot; | 175 ScopedPersistent<v8::Value> m_liveRoot; |
173 RefPtr<ScriptState> m_scriptRegexpScriptState; | 176 RefPtr<ScriptState> m_scriptRegexpScriptState; |
174 | 177 |
175 bool m_constructorMode; | 178 bool m_constructorMode; |
176 friend class ConstructorMode; | 179 friend class ConstructorMode; |
177 | 180 |
178 bool m_useCounterDisabled; | 181 bool m_useCounterDisabled; |
179 friend class UseCounterDisabledScope; | 182 friend class UseCounterDisabledScope; |
180 | 183 |
181 bool m_isHandlingRecursionLevelError; | 184 bool m_isHandlingRecursionLevelError; |
182 bool m_isReportingException; | 185 bool m_isReportingException; |
183 | 186 |
184 Vector<OwnPtr<EndOfScopeTask>> m_endOfScopeTasks; | 187 Vector<OwnPtr<EndOfScopeTask>> m_endOfScopeTasks; |
185 OwnPtr<ThreadDebugger> m_threadDebugger; | 188 OwnPtr<ThreadDebugger> m_threadDebugger; |
186 | 189 |
187 Persistent<ActiveScriptWrappableSet> m_activeScriptWrappables; | 190 Persistent<ActiveScriptWrappableSet> m_activeScriptWrappables; |
188 }; | 191 }; |
189 | 192 |
190 } // namespace blink | 193 } // namespace blink |
191 | 194 |
192 #endif // V8PerIsolateData_h | 195 #endif // V8PerIsolateData_h |
OLD | NEW |