| 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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 #endif | 93 #endif |
| 94 | 94 |
| 95 GCEventData* gcEventData() { return m_gcEventData.get(); } | 95 GCEventData* gcEventData() { return m_gcEventData.get(); } |
| 96 V8HiddenValue* hiddenValue() { return m_hiddenValue.get(); } | 96 V8HiddenValue* hiddenValue() { return m_hiddenValue.get(); } |
| 97 | 97 |
| 98 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); | 98 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); |
| 99 v8::Handle<v8::FunctionTemplate> existingDOMTemplate(void* domTemplateKey); | 99 v8::Handle<v8::FunctionTemplate> existingDOMTemplate(void* domTemplateKey); |
| 100 void setDOMTemplate(void* domTemplateKey, v8::Handle<v8::FunctionTemplate>); | 100 void setDOMTemplate(void* domTemplateKey, v8::Handle<v8::FunctionTemplate>); |
| 101 | 101 |
| 102 bool hasInstance(const WrapperTypeInfo*, v8::Handle<v8::Value>); | 102 bool hasInstance(const WrapperTypeInfo*, v8::Handle<v8::Value>); |
| 103 v8::Handle<v8::Object> findInstanceInPrototypeChain(const WrapperTypeInfo*,
v8::Handle<v8::Value>); | 103 v8::Local<v8::Object> findInstanceInPrototypeChain(const WrapperTypeInfo*, v
8::Local<v8::Value>); |
| 104 | 104 |
| 105 v8::Local<v8::Context> ensureScriptRegexpContext(); | 105 v8::Local<v8::Context> ensureScriptRegexpContext(); |
| 106 | 106 |
| 107 const char* previousSamplingState() const { return m_previousSamplingState;
} | 107 const char* previousSamplingState() const { return m_previousSamplingState;
} |
| 108 void setPreviousSamplingState(const char* name) { m_previousSamplingState =
name; } | 108 void setPreviousSamplingState(const char* name) { m_previousSamplingState =
name; } |
| 109 | 109 |
| 110 // EndOfScopeTasks are run by V8RecursionScope when control is returning | 110 // EndOfScopeTasks are run by V8RecursionScope when control is returning |
| 111 // to C++ from script, after executing a script task (e.g. callback, | 111 // to C++ from script, after executing a script task (e.g. callback, |
| 112 // event) or microtasks (e.g. promise). This is explicitly needed for | 112 // event) or microtasks (e.g. promise). This is explicitly needed for |
| 113 // Indexed DB transactions per spec, but should in general be avoided. | 113 // Indexed DB transactions per spec, but should in general be avoided. |
| 114 void addEndOfScopeTask(PassOwnPtr<EndOfScopeTask>); | 114 void addEndOfScopeTask(PassOwnPtr<EndOfScopeTask>); |
| 115 void runEndOfScopeTasks(); | 115 void runEndOfScopeTasks(); |
| 116 void clearEndOfScopeTasks(); | 116 void clearEndOfScopeTasks(); |
| 117 | 117 |
| 118 private: | 118 private: |
| 119 V8PerIsolateData(); | 119 V8PerIsolateData(); |
| 120 ~V8PerIsolateData(); | 120 ~V8PerIsolateData(); |
| 121 | 121 |
| 122 typedef HashMap<const void*, v8::Eternal<v8::FunctionTemplate> > DOMTemplate
Map; | 122 typedef HashMap<const void*, v8::Eternal<v8::FunctionTemplate> > DOMTemplate
Map; |
| 123 DOMTemplateMap& currentDOMTemplateMap(); | 123 DOMTemplateMap& currentDOMTemplateMap(); |
| 124 bool hasInstance(const WrapperTypeInfo*, v8::Handle<v8::Value>, DOMTemplateM
ap&); | 124 bool hasInstance(const WrapperTypeInfo*, v8::Handle<v8::Value>, DOMTemplateM
ap&); |
| 125 v8::Handle<v8::Object> findInstanceInPrototypeChain(const WrapperTypeInfo*,
v8::Handle<v8::Value>, DOMTemplateMap&); | 125 v8::Local<v8::Object> findInstanceInPrototypeChain(const WrapperTypeInfo*, v
8::Local<v8::Value>, DOMTemplateMap&); |
| 126 | 126 |
| 127 bool m_destructionPending; | 127 bool m_destructionPending; |
| 128 OwnPtr<gin::IsolateHolder> m_isolateHolder; | 128 OwnPtr<gin::IsolateHolder> m_isolateHolder; |
| 129 DOMTemplateMap m_domTemplateMapForMainWorld; | 129 DOMTemplateMap m_domTemplateMapForMainWorld; |
| 130 DOMTemplateMap m_domTemplateMapForNonMainWorld; | 130 DOMTemplateMap m_domTemplateMapForNonMainWorld; |
| 131 ScopedPersistent<v8::FunctionTemplate> m_toStringTemplate; | 131 ScopedPersistent<v8::FunctionTemplate> m_toStringTemplate; |
| 132 OwnPtr<StringCache> m_stringCache; | 132 OwnPtr<StringCache> m_stringCache; |
| 133 OwnPtr<V8HiddenValue> m_hiddenValue; | 133 OwnPtr<V8HiddenValue> m_hiddenValue; |
| 134 ScopedPersistent<v8::Value> m_liveRoot; | 134 ScopedPersistent<v8::Value> m_liveRoot; |
| 135 RefPtr<ScriptState> m_scriptRegexpScriptState; | 135 RefPtr<ScriptState> m_scriptRegexpScriptState; |
| (...skipping 12 matching lines...) Expand all Loading... |
| 148 #endif | 148 #endif |
| 149 OwnPtr<GCEventData> m_gcEventData; | 149 OwnPtr<GCEventData> m_gcEventData; |
| 150 bool m_performingMicrotaskCheckpoint; | 150 bool m_performingMicrotaskCheckpoint; |
| 151 | 151 |
| 152 Vector<OwnPtr<EndOfScopeTask>> m_endOfScopeTasks; | 152 Vector<OwnPtr<EndOfScopeTask>> m_endOfScopeTasks; |
| 153 }; | 153 }; |
| 154 | 154 |
| 155 } // namespace blink | 155 } // namespace blink |
| 156 | 156 |
| 157 #endif // V8PerIsolateData_h | 157 #endif // V8PerIsolateData_h |
| OLD | NEW |