| 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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 GCEventData* gcEventData() { return m_gcEventData.get(); } | 85 GCEventData* gcEventData() { return m_gcEventData.get(); } |
| 86 V8HiddenValue* hiddenValue() { return m_hiddenValue.get(); } | 86 V8HiddenValue* hiddenValue() { return m_hiddenValue.get(); } |
| 87 | 87 |
| 88 v8::Handle<v8::FunctionTemplate> domTemplate(void* domTemplateKey, v8::Funct
ionCallback = 0, v8::Handle<v8::Value> data = v8::Handle<v8::Value>(), v8::Handl
e<v8::Signature> = v8::Handle<v8::Signature>(), int length = 0); | 88 v8::Handle<v8::FunctionTemplate> domTemplate(void* domTemplateKey, v8::Funct
ionCallback = 0, v8::Handle<v8::Value> data = v8::Handle<v8::Value>(), v8::Handl
e<v8::Signature> = v8::Handle<v8::Signature>(), int length = 0); |
| 89 v8::Handle<v8::FunctionTemplate> existingDOMTemplate(void* domTemplateKey); | 89 v8::Handle<v8::FunctionTemplate> existingDOMTemplate(void* domTemplateKey); |
| 90 void setDOMTemplate(void* domTemplateKey, v8::Handle<v8::FunctionTemplate>); | 90 void setDOMTemplate(void* domTemplateKey, v8::Handle<v8::FunctionTemplate>); |
| 91 | 91 |
| 92 bool hasInstance(const WrapperTypeInfo*, v8::Handle<v8::Value>); | 92 bool hasInstance(const WrapperTypeInfo*, v8::Handle<v8::Value>); |
| 93 v8::Handle<v8::Object> findInstanceInPrototypeChain(const WrapperTypeInfo*,
v8::Handle<v8::Value>); | 93 v8::Handle<v8::Object> findInstanceInPrototypeChain(const WrapperTypeInfo*,
v8::Handle<v8::Value>); |
| 94 | 94 |
| 95 // FIXME: This method should go away, because we shouldn't need a random con
text to be able to enqueue microtasks. | 95 v8::Local<v8::Context> ensureScriptRegexpContext(); |
| 96 v8::Local<v8::Context> ensureDomInJSContext(); | |
| 97 | 96 |
| 98 const char* previousSamplingState() const { return m_previousSamplingState;
} | 97 const char* previousSamplingState() const { return m_previousSamplingState;
} |
| 99 void setPreviousSamplingState(const char* name) { m_previousSamplingState =
name; } | 98 void setPreviousSamplingState(const char* name) { m_previousSamplingState =
name; } |
| 100 | 99 |
| 101 private: | 100 private: |
| 102 explicit V8PerIsolateData(v8::Isolate*); | 101 explicit V8PerIsolateData(v8::Isolate*); |
| 103 ~V8PerIsolateData(); | 102 ~V8PerIsolateData(); |
| 104 | 103 |
| 105 typedef HashMap<const void*, v8::Eternal<v8::FunctionTemplate> > DOMTemplate
Map; | 104 typedef HashMap<const void*, v8::Eternal<v8::FunctionTemplate> > DOMTemplate
Map; |
| 106 DOMTemplateMap& currentDOMTemplateMap(); | 105 DOMTemplateMap& currentDOMTemplateMap(); |
| 107 bool hasInstance(const WrapperTypeInfo*, v8::Handle<v8::Value>, DOMTemplateM
ap&); | 106 bool hasInstance(const WrapperTypeInfo*, v8::Handle<v8::Value>, DOMTemplateM
ap&); |
| 108 v8::Handle<v8::Object> findInstanceInPrototypeChain(const WrapperTypeInfo*,
v8::Handle<v8::Value>, DOMTemplateMap&); | 107 v8::Handle<v8::Object> findInstanceInPrototypeChain(const WrapperTypeInfo*,
v8::Handle<v8::Value>, DOMTemplateMap&); |
| 109 | 108 |
| 110 v8::Isolate* m_isolate; | 109 v8::Isolate* m_isolate; |
| 111 OwnPtr<gin::IsolateHolder> m_isolateHolder; | 110 OwnPtr<gin::IsolateHolder> m_isolateHolder; |
| 112 DOMTemplateMap m_domTemplateMapForMainWorld; | 111 DOMTemplateMap m_domTemplateMapForMainWorld; |
| 113 DOMTemplateMap m_domTemplateMapForNonMainWorld; | 112 DOMTemplateMap m_domTemplateMapForNonMainWorld; |
| 114 ScopedPersistent<v8::FunctionTemplate> m_toStringTemplate; | 113 ScopedPersistent<v8::FunctionTemplate> m_toStringTemplate; |
| 115 OwnPtr<StringCache> m_stringCache; | 114 OwnPtr<StringCache> m_stringCache; |
| 116 OwnPtr<V8HiddenValue> m_hiddenValue; | 115 OwnPtr<V8HiddenValue> m_hiddenValue; |
| 117 ScopedPersistent<v8::Value> m_liveRoot; | 116 ScopedPersistent<v8::Value> m_liveRoot; |
| 118 RefPtr<ScriptState> m_blinkInJSScriptState; | 117 RefPtr<ScriptState> m_scriptRegexpScriptState; |
| 119 | 118 |
| 120 const char* m_previousSamplingState; | 119 const char* m_previousSamplingState; |
| 121 | 120 |
| 122 bool m_constructorMode; | 121 bool m_constructorMode; |
| 123 friend class ConstructorMode; | 122 friend class ConstructorMode; |
| 124 | 123 |
| 125 int m_recursionLevel; | 124 int m_recursionLevel; |
| 126 | 125 |
| 127 #ifndef NDEBUG | 126 #ifndef NDEBUG |
| 128 int m_internalScriptRecursionLevel; | 127 int m_internalScriptRecursionLevel; |
| 129 #endif | 128 #endif |
| 130 OwnPtr<GCEventData> m_gcEventData; | 129 OwnPtr<GCEventData> m_gcEventData; |
| 131 bool m_performingMicrotaskCheckpoint; | 130 bool m_performingMicrotaskCheckpoint; |
| 132 }; | 131 }; |
| 133 | 132 |
| 134 } // namespace WebCore | 133 } // namespace WebCore |
| 135 | 134 |
| 136 #endif // V8PerIsolateData_h | 135 #endif // V8PerIsolateData_h |
| OLD | NEW |