| 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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 GCEventData* gcEventData() { return m_gcEventData.get(); } | 99 GCEventData* gcEventData() { return m_gcEventData.get(); } |
| 100 V8HiddenValue* hiddenValue() { return m_hiddenValue.get(); } | 100 V8HiddenValue* hiddenValue() { return m_hiddenValue.get(); } |
| 101 | 101 |
| 102 v8::Handle<v8::FunctionTemplate> domTemplate(WrapperWorldType, void* domTemp
lateKey, v8::FunctionCallback = 0, v8::Handle<v8::Value> data = v8::Handle<v8::V
alue>(), v8::Handle<v8::Signature> = v8::Handle<v8::Signature>(), int length = 0
); | 102 v8::Handle<v8::FunctionTemplate> domTemplate(WrapperWorldType, void* domTemp
lateKey, v8::FunctionCallback = 0, v8::Handle<v8::Value> data = v8::Handle<v8::V
alue>(), v8::Handle<v8::Signature> = v8::Handle<v8::Signature>(), int length = 0
); |
| 103 v8::Handle<v8::FunctionTemplate> existingDOMTemplate(WrapperWorldType, void*
domTemplateKey); | 103 v8::Handle<v8::FunctionTemplate> existingDOMTemplate(WrapperWorldType, void*
domTemplateKey); |
| 104 void setDOMTemplate(WrapperWorldType, void* domTemplateKey, v8::Handle<v8::F
unctionTemplate>); | 104 void setDOMTemplate(WrapperWorldType, void* domTemplateKey, v8::Handle<v8::F
unctionTemplate>); |
| 105 | 105 |
| 106 bool hasInstance(const WrapperTypeInfo*, v8::Handle<v8::Value>); | 106 bool hasInstance(const WrapperTypeInfo*, v8::Handle<v8::Value>); |
| 107 v8::Handle<v8::Object> findInstanceInPrototypeChain(const WrapperTypeInfo*,
v8::Handle<v8::Value>); | 107 v8::Handle<v8::Object> findInstanceInPrototypeChain(const WrapperTypeInfo*,
v8::Handle<v8::Value>); |
| 108 | 108 |
| 109 v8::Local<v8::Context> ensureRegexContext(); | 109 v8::Local<v8::Context> ensureDomInJSContext(); |
| 110 | 110 |
| 111 const char* previousSamplingState() const { return m_previousSamplingState;
} | 111 const char* previousSamplingState() const { return m_previousSamplingState;
} |
| 112 void setPreviousSamplingState(const char* name) { m_previousSamplingState =
name; } | 112 void setPreviousSamplingState(const char* name) { m_previousSamplingState =
name; } |
| 113 | 113 |
| 114 private: | 114 private: |
| 115 explicit V8PerIsolateData(v8::Isolate*); | 115 explicit V8PerIsolateData(v8::Isolate*); |
| 116 ~V8PerIsolateData(); | 116 ~V8PerIsolateData(); |
| 117 bool hasInstance(const WrapperTypeInfo*, v8::Handle<v8::Value>, TemplateMap&
); | 117 bool hasInstance(const WrapperTypeInfo*, v8::Handle<v8::Value>, TemplateMap&
); |
| 118 v8::Handle<v8::Object> findInstanceInPrototypeChain(const WrapperTypeInfo*,
v8::Handle<v8::Value>, TemplateMap&); | 118 v8::Handle<v8::Object> findInstanceInPrototypeChain(const WrapperTypeInfo*,
v8::Handle<v8::Value>, TemplateMap&); |
| 119 | 119 |
| 120 v8::Isolate* m_isolate; | 120 v8::Isolate* m_isolate; |
| 121 OwnPtr<gin::IsolateHolder> m_isolateHolder; | 121 OwnPtr<gin::IsolateHolder> m_isolateHolder; |
| 122 bool m_isMainThread; // Caches the result of isMainThread() for performance. | 122 bool m_isMainThread; // Caches the result of isMainThread() for performance. |
| 123 TemplateMap m_templatesForMainWorld; | 123 TemplateMap m_templatesForMainWorld; |
| 124 TemplateMap m_templatesForNonMainWorld; | 124 TemplateMap m_templatesForNonMainWorld; |
| 125 ScopedPersistent<v8::FunctionTemplate> m_toStringTemplate; | 125 ScopedPersistent<v8::FunctionTemplate> m_toStringTemplate; |
| 126 OwnPtr<StringCache> m_stringCache; | 126 OwnPtr<StringCache> m_stringCache; |
| 127 | 127 |
| 128 OwnPtr<V8HiddenValue> m_hiddenValue; | 128 OwnPtr<V8HiddenValue> m_hiddenValue; |
| 129 ScopedPersistent<v8::Value> m_liveRoot; | 129 ScopedPersistent<v8::Value> m_liveRoot; |
| 130 ScopedPersistent<v8::Context> m_regexContext; | 130 ScopedPersistent<v8::Context> m_domInJSContext; |
| 131 | 131 |
| 132 const char* m_previousSamplingState; | 132 const char* m_previousSamplingState; |
| 133 | 133 |
| 134 bool m_constructorMode; | 134 bool m_constructorMode; |
| 135 friend class ConstructorMode; | 135 friend class ConstructorMode; |
| 136 | 136 |
| 137 int m_recursionLevel; | 137 int m_recursionLevel; |
| 138 | 138 |
| 139 #ifndef NDEBUG | 139 #ifndef NDEBUG |
| 140 int m_internalScriptRecursionLevel; | 140 int m_internalScriptRecursionLevel; |
| 141 #endif | 141 #endif |
| 142 OwnPtr<GCEventData> m_gcEventData; | 142 OwnPtr<GCEventData> m_gcEventData; |
| 143 bool m_performingMicrotaskCheckpoint; | 143 bool m_performingMicrotaskCheckpoint; |
| 144 }; | 144 }; |
| 145 | 145 |
| 146 } // namespace WebCore | 146 } // namespace WebCore |
| 147 | 147 |
| 148 #endif // V8PerIsolateData_h | 148 #endif // V8PerIsolateData_h |
| OLD | NEW |