| 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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 // objects have been allocated that we want to take every opportunity | 120 // objects have been allocated that we want to take every opportunity |
| 121 // to collect. | 121 // to collect. |
| 122 void setShouldCollectGarbageSoon() { m_shouldCollectGarbageSoon = true; } | 122 void setShouldCollectGarbageSoon() { m_shouldCollectGarbageSoon = true; } |
| 123 void clearShouldCollectGarbageSoon() { m_shouldCollectGarbageSoon = false; } | 123 void clearShouldCollectGarbageSoon() { m_shouldCollectGarbageSoon = false; } |
| 124 bool shouldCollectGarbageSoon() const { return m_shouldCollectGarbageSoon; } | 124 bool shouldCollectGarbageSoon() const { return m_shouldCollectGarbageSoon; } |
| 125 | 125 |
| 126 v8::Handle<v8::FunctionTemplate> privateTemplate(WrapperWorldType, void* pri
vatePointer, v8::FunctionCallback = 0, v8::Handle<v8::Value> data = v8::Handle<v
8::Value>(), v8::Handle<v8::Signature> = v8::Handle<v8::Signature>(), int length
= 0); | 126 v8::Handle<v8::FunctionTemplate> privateTemplate(WrapperWorldType, void* pri
vatePointer, v8::FunctionCallback = 0, v8::Handle<v8::Value> data = v8::Handle<v
8::Value>(), v8::Handle<v8::Signature> = v8::Handle<v8::Signature>(), int length
= 0); |
| 127 v8::Handle<v8::FunctionTemplate> privateTemplateIfExists(WrapperWorldType, v
oid* privatePointer); | 127 v8::Handle<v8::FunctionTemplate> privateTemplateIfExists(WrapperWorldType, v
oid* privatePointer); |
| 128 void setPrivateTemplate(WrapperWorldType, void* privatePointer, v8::Handle<v
8::FunctionTemplate>); | 128 void setPrivateTemplate(WrapperWorldType, void* privatePointer, v8::Handle<v
8::FunctionTemplate>); |
| 129 | 129 |
| 130 bool hasInstance(const WrapperTypeInfo*, v8::Handle<v8::Value>, WrapperWorld
Type); | 130 bool hasInstanceInMainWorld(const WrapperTypeInfo*, v8::Handle<v8::Value>); |
| 131 bool hasInstanceInNonMainWorld(const WrapperTypeInfo*, v8::Handle<v8::Value>
); |
| 131 | 132 |
| 132 v8::Local<v8::Context> ensureRegexContext(); | 133 v8::Local<v8::Context> ensureRegexContext(); |
| 133 | 134 |
| 134 const char* previousSamplingState() const { return m_previousSamplingState;
} | 135 const char* previousSamplingState() const { return m_previousSamplingState;
} |
| 135 void setPreviousSamplingState(const char* name) { m_previousSamplingState =
name; } | 136 void setPreviousSamplingState(const char* name) { m_previousSamplingState =
name; } |
| 136 | 137 |
| 137 private: | 138 private: |
| 138 explicit V8PerIsolateData(v8::Isolate*); | 139 explicit V8PerIsolateData(v8::Isolate*); |
| 139 ~V8PerIsolateData(); | 140 ~V8PerIsolateData(); |
| 141 bool hasInstance(const WrapperTypeInfo*, v8::Handle<v8::Value>, TemplateMap&
); |
| 140 static void constructorOfToString(const v8::FunctionCallbackInfo<v8::Value>&
); | 142 static void constructorOfToString(const v8::FunctionCallbackInfo<v8::Value>&
); |
| 141 | 143 |
| 142 v8::Isolate* m_isolate; | 144 v8::Isolate* m_isolate; |
| 143 TemplateMap m_templatesForMainWorld; | 145 TemplateMap m_templatesForMainWorld; |
| 144 TemplateMap m_templatesForNonMainWorld; | 146 TemplateMap m_templatesForNonMainWorld; |
| 145 ScopedPersistent<v8::FunctionTemplate> m_toStringTemplate; | 147 ScopedPersistent<v8::FunctionTemplate> m_toStringTemplate; |
| 146 v8::Persistent<v8::FunctionTemplate> m_lazyEventListenerToStringTemplate; | 148 v8::Persistent<v8::FunctionTemplate> m_lazyEventListenerToStringTemplate; |
| 147 OwnPtr<StringCache> m_stringCache; | 149 OwnPtr<StringCache> m_stringCache; |
| 148 | 150 |
| 149 Vector<DOMDataStore*> m_domDataList; | 151 Vector<DOMDataStore*> m_domDataList; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 163 #ifndef NDEBUG | 165 #ifndef NDEBUG |
| 164 int m_internalScriptRecursionLevel; | 166 int m_internalScriptRecursionLevel; |
| 165 #endif | 167 #endif |
| 166 OwnPtr<GCEventData> m_gcEventData; | 168 OwnPtr<GCEventData> m_gcEventData; |
| 167 bool m_shouldCollectGarbageSoon; | 169 bool m_shouldCollectGarbageSoon; |
| 168 }; | 170 }; |
| 169 | 171 |
| 170 } // namespace WebCore | 172 } // namespace WebCore |
| 171 | 173 |
| 172 #endif // V8PerIsolateData_h | 174 #endif // V8PerIsolateData_h |
| OLD | NEW |