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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 return m_templatesForMainWorld; | 73 return m_templatesForMainWorld; |
74 return m_templatesForNonMainWorld; | 74 return m_templatesForNonMainWorld; |
75 } | 75 } |
76 | 76 |
77 v8::Handle<v8::FunctionTemplate> toStringTemplate(); | 77 v8::Handle<v8::FunctionTemplate> toStringTemplate(); |
78 | 78 |
79 StringCache* stringCache() { return m_stringCache.get(); } | 79 StringCache* stringCache() { return m_stringCache.get(); } |
80 | 80 |
81 v8::Persistent<v8::Value>& ensureLiveRoot(); | 81 v8::Persistent<v8::Value>& ensureLiveRoot(); |
82 | 82 |
83 DOMDataStoreList& allStores() { return m_domDataStoreList; } | |
84 | |
85 void registerDOMDataStore(DOMDataStore* domDataStore) | |
86 { | |
87 ASSERT(m_domDataStoreList.find(domDataStore) == kNotFound); | |
88 m_domDataStoreList.append(domDataStore); | |
89 } | |
90 | |
91 void unregisterDOMDataStore(DOMDataStore* domDataStore) | |
92 { | |
93 ASSERT(m_domDataStoreList.find(domDataStore) != kNotFound); | |
94 m_domDataStoreList.remove(m_domDataStoreList.find(domDataStore)); | |
95 } | |
96 | |
97 int recursionLevel() const { return m_recursionLevel; } | 83 int recursionLevel() const { return m_recursionLevel; } |
98 int incrementRecursionLevel() { return ++m_recursionLevel; } | 84 int incrementRecursionLevel() { return ++m_recursionLevel; } |
99 int decrementRecursionLevel() { return --m_recursionLevel; } | 85 int decrementRecursionLevel() { return --m_recursionLevel; } |
100 | 86 |
101 bool performingMicrotaskCheckpoint() const { return m_performingMicrotaskChe
ckpoint; } | 87 bool performingMicrotaskCheckpoint() const { return m_performingMicrotaskChe
ckpoint; } |
102 void setPerformingMicrotaskCheckpoint(bool performingMicrotaskCheckpoint) {
m_performingMicrotaskCheckpoint = performingMicrotaskCheckpoint; } | 88 void setPerformingMicrotaskCheckpoint(bool performingMicrotaskCheckpoint) {
m_performingMicrotaskCheckpoint = performingMicrotaskCheckpoint; } |
103 | 89 |
104 #ifndef NDEBUG | 90 #ifndef NDEBUG |
105 int internalScriptRecursionLevel() const { return m_internalScriptRecursionL
evel; } | 91 int internalScriptRecursionLevel() const { return m_internalScriptRecursionL
evel; } |
106 int incrementInternalScriptRecursionLevel() { return ++m_internalScriptRecur
sionLevel; } | 92 int incrementInternalScriptRecursionLevel() { return ++m_internalScriptRecur
sionLevel; } |
(...skipping 28 matching lines...) Expand all Loading... |
135 bool hasInstance(const WrapperTypeInfo*, v8::Handle<v8::Value>, TemplateMap&
); | 121 bool hasInstance(const WrapperTypeInfo*, v8::Handle<v8::Value>, TemplateMap&
); |
136 v8::Handle<v8::Object> findInstanceInPrototypeChain(const WrapperTypeInfo*,
v8::Handle<v8::Value>, TemplateMap&); | 122 v8::Handle<v8::Object> findInstanceInPrototypeChain(const WrapperTypeInfo*,
v8::Handle<v8::Value>, TemplateMap&); |
137 | 123 |
138 v8::Isolate* m_isolate; | 124 v8::Isolate* m_isolate; |
139 bool m_isMainThread; // Caches the result of isMainThread() for performance. | 125 bool m_isMainThread; // Caches the result of isMainThread() for performance. |
140 TemplateMap m_templatesForMainWorld; | 126 TemplateMap m_templatesForMainWorld; |
141 TemplateMap m_templatesForNonMainWorld; | 127 TemplateMap m_templatesForNonMainWorld; |
142 ScopedPersistent<v8::FunctionTemplate> m_toStringTemplate; | 128 ScopedPersistent<v8::FunctionTemplate> m_toStringTemplate; |
143 OwnPtr<StringCache> m_stringCache; | 129 OwnPtr<StringCache> m_stringCache; |
144 | 130 |
145 Vector<DOMDataStore*> m_domDataStoreList; | |
146 | |
147 ScopedPersistent<v8::Value> m_liveRoot; | 131 ScopedPersistent<v8::Value> m_liveRoot; |
148 ScopedPersistent<v8::Context> m_regexContext; | 132 ScopedPersistent<v8::Context> m_regexContext; |
149 | 133 |
150 const char* m_previousSamplingState; | 134 const char* m_previousSamplingState; |
151 | 135 |
152 bool m_constructorMode; | 136 bool m_constructorMode; |
153 friend class ConstructorMode; | 137 friend class ConstructorMode; |
154 | 138 |
155 int m_recursionLevel; | 139 int m_recursionLevel; |
156 | 140 |
157 #ifndef NDEBUG | 141 #ifndef NDEBUG |
158 int m_internalScriptRecursionLevel; | 142 int m_internalScriptRecursionLevel; |
159 #endif | 143 #endif |
160 OwnPtr<GCEventData> m_gcEventData; | 144 OwnPtr<GCEventData> m_gcEventData; |
161 bool m_shouldCollectGarbageSoon; | 145 bool m_shouldCollectGarbageSoon; |
162 bool m_performingMicrotaskCheckpoint; | 146 bool m_performingMicrotaskCheckpoint; |
163 }; | 147 }; |
164 | 148 |
165 } // namespace WebCore | 149 } // namespace WebCore |
166 | 150 |
167 #endif // V8PerIsolateData_h | 151 #endif // V8PerIsolateData_h |
OLD | NEW |