| 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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 v8::Local<v8::FunctionTemplate> domTemplate(const void* domTemplateKey, v8::
FunctionCallback = 0, v8::Local<v8::Value> data = v8::Local<v8::Value>(), v8::Lo
cal<v8::Signature> = v8::Local<v8::Signature>(), int length = 0); | 104 v8::Local<v8::FunctionTemplate> domTemplate(const void* domTemplateKey, v8::
FunctionCallback = 0, v8::Local<v8::Value> data = v8::Local<v8::Value>(), v8::Lo
cal<v8::Signature> = v8::Local<v8::Signature>(), int length = 0); |
| 105 v8::Local<v8::FunctionTemplate> existingDOMTemplate(const void* domTemplateK
ey); | 105 v8::Local<v8::FunctionTemplate> existingDOMTemplate(const void* domTemplateK
ey); |
| 106 void setDOMTemplate(const void* domTemplateKey, v8::Local<v8::FunctionTempla
te>); | 106 void setDOMTemplate(const void* domTemplateKey, v8::Local<v8::FunctionTempla
te>); |
| 107 | 107 |
| 108 bool hasInstance(const WrapperTypeInfo* untrusted, v8::Local<v8::Value>); | 108 bool hasInstance(const WrapperTypeInfo* untrusted, v8::Local<v8::Value>); |
| 109 v8::Local<v8::Object> findInstanceInPrototypeChain(const WrapperTypeInfo*, v
8::Local<v8::Value>); | 109 v8::Local<v8::Object> findInstanceInPrototypeChain(const WrapperTypeInfo*, v
8::Local<v8::Value>); |
| 110 | 110 |
| 111 v8::Local<v8::Context> ensureScriptRegexpContext(); | 111 v8::Local<v8::Context> ensureScriptRegexpContext(); |
| 112 void clearScriptRegexpContext(); | 112 void clearScriptRegexpContext(); |
| 113 | 113 |
| 114 const char* previousSamplingState() const { return m_previousSamplingState;
} | |
| 115 void setPreviousSamplingState(const char* name) { m_previousSamplingState =
name; } | |
| 116 | |
| 117 // EndOfScopeTasks are run by V8RecursionScope when control is returning | 114 // EndOfScopeTasks are run by V8RecursionScope when control is returning |
| 118 // to C++ from script, after executing a script task (e.g. callback, | 115 // to C++ from script, after executing a script task (e.g. callback, |
| 119 // event) or microtasks (e.g. promise). This is explicitly needed for | 116 // event) or microtasks (e.g. promise). This is explicitly needed for |
| 120 // Indexed DB transactions per spec, but should in general be avoided. | 117 // Indexed DB transactions per spec, but should in general be avoided. |
| 121 void addEndOfScopeTask(PassOwnPtr<EndOfScopeTask>); | 118 void addEndOfScopeTask(PassOwnPtr<EndOfScopeTask>); |
| 122 void runEndOfScopeTasks(); | 119 void runEndOfScopeTasks(); |
| 123 void clearEndOfScopeTasks(); | 120 void clearEndOfScopeTasks(); |
| 124 | 121 |
| 125 void setThreadDebugger(PassOwnPtr<ThreadDebugger>); | 122 void setThreadDebugger(PassOwnPtr<ThreadDebugger>); |
| 126 ThreadDebugger* threadDebugger(); | 123 ThreadDebugger* threadDebugger(); |
| 127 | 124 |
| 128 private: | 125 private: |
| 129 V8PerIsolateData(); | 126 V8PerIsolateData(); |
| 130 ~V8PerIsolateData(); | 127 ~V8PerIsolateData(); |
| 131 | 128 |
| 132 typedef HashMap<const void*, v8::Eternal<v8::FunctionTemplate>> DOMTemplateM
ap; | 129 typedef HashMap<const void*, v8::Eternal<v8::FunctionTemplate>> DOMTemplateM
ap; |
| 133 DOMTemplateMap& currentDOMTemplateMap(); | 130 DOMTemplateMap& currentDOMTemplateMap(); |
| 134 bool hasInstance(const WrapperTypeInfo* untrusted, v8::Local<v8::Value>, DOM
TemplateMap&); | 131 bool hasInstance(const WrapperTypeInfo* untrusted, v8::Local<v8::Value>, DOM
TemplateMap&); |
| 135 v8::Local<v8::Object> findInstanceInPrototypeChain(const WrapperTypeInfo*, v
8::Local<v8::Value>, DOMTemplateMap&); | 132 v8::Local<v8::Object> findInstanceInPrototypeChain(const WrapperTypeInfo*, v
8::Local<v8::Value>, DOMTemplateMap&); |
| 136 | 133 |
| 137 bool m_destructionPending; | 134 bool m_destructionPending; |
| 138 OwnPtr<gin::IsolateHolder> m_isolateHolder; | 135 OwnPtr<gin::IsolateHolder> m_isolateHolder; |
| 139 DOMTemplateMap m_domTemplateMapForMainWorld; | 136 DOMTemplateMap m_domTemplateMapForMainWorld; |
| 140 DOMTemplateMap m_domTemplateMapForNonMainWorld; | 137 DOMTemplateMap m_domTemplateMapForNonMainWorld; |
| 141 OwnPtr<StringCache> m_stringCache; | 138 OwnPtr<StringCache> m_stringCache; |
| 142 OwnPtr<V8HiddenValue> m_hiddenValue; | 139 OwnPtr<V8HiddenValue> m_hiddenValue; |
| 143 ScopedPersistent<v8::Value> m_liveRoot; | 140 ScopedPersistent<v8::Value> m_liveRoot; |
| 144 RefPtr<ScriptState> m_scriptRegexpScriptState; | 141 RefPtr<ScriptState> m_scriptRegexpScriptState; |
| 145 | 142 |
| 146 const char* m_previousSamplingState; | |
| 147 | |
| 148 bool m_constructorMode; | 143 bool m_constructorMode; |
| 149 friend class ConstructorMode; | 144 friend class ConstructorMode; |
| 150 | 145 |
| 151 int m_recursionLevel; | 146 int m_recursionLevel; |
| 152 bool m_isHandlingRecursionLevelError; | 147 bool m_isHandlingRecursionLevelError; |
| 153 bool m_isReportingException; | 148 bool m_isReportingException; |
| 154 | 149 |
| 155 #if ENABLE(ASSERT) | 150 #if ENABLE(ASSERT) |
| 156 int m_internalScriptRecursionLevel; | 151 int m_internalScriptRecursionLevel; |
| 157 #endif | 152 #endif |
| 158 bool m_performingMicrotaskCheckpoint; | 153 bool m_performingMicrotaskCheckpoint; |
| 159 | 154 |
| 160 Vector<OwnPtr<EndOfScopeTask>> m_endOfScopeTasks; | 155 Vector<OwnPtr<EndOfScopeTask>> m_endOfScopeTasks; |
| 161 OwnPtr<ThreadDebugger> m_threadDebugger; | 156 OwnPtr<ThreadDebugger> m_threadDebugger; |
| 162 }; | 157 }; |
| 163 | 158 |
| 164 } // namespace blink | 159 } // namespace blink |
| 165 | 160 |
| 166 #endif // V8PerIsolateData_h | 161 #endif // V8PerIsolateData_h |
| OLD | NEW |