| 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 ASSERT(isolate->GetData(gin::kEmbedderBlink)); | 67 ASSERT(isolate->GetData(gin::kEmbedderBlink)); |
| 68 return static_cast<V8PerIsolateData*>(isolate->GetData(gin::kEmbedderBli
nk)); | 68 return static_cast<V8PerIsolateData*>(isolate->GetData(gin::kEmbedderBli
nk)); |
| 69 } | 69 } |
| 70 | 70 |
| 71 static void willBeDestroyed(v8::Isolate*); | 71 static void willBeDestroyed(v8::Isolate*); |
| 72 static void destroy(v8::Isolate*); | 72 static void destroy(v8::Isolate*); |
| 73 static v8::Isolate* mainThreadIsolate(); | 73 static v8::Isolate* mainThreadIsolate(); |
| 74 | 74 |
| 75 static void enableIdleTasks(v8::Isolate*, PassOwnPtr<gin::V8IdleTaskRunner>)
; | 75 static void enableIdleTasks(v8::Isolate*, PassOwnPtr<gin::V8IdleTaskRunner>)
; |
| 76 | 76 |
| 77 bool destructionPending() const { return m_destructionPending; } |
| 77 v8::Isolate* isolate() { return m_isolateHolder->isolate(); } | 78 v8::Isolate* isolate() { return m_isolateHolder->isolate(); } |
| 78 | 79 |
| 79 StringCache* stringCache() { return m_stringCache.get(); } | 80 StringCache* stringCache() { return m_stringCache.get(); } |
| 80 | 81 |
| 81 v8::Persistent<v8::Value>& ensureLiveRoot(); | 82 v8::Persistent<v8::Value>& ensureLiveRoot(); |
| 82 | 83 |
| 84 int recursionLevel() const { return m_recursionLevel; } |
| 85 int incrementRecursionLevel() { return ++m_recursionLevel; } |
| 86 int decrementRecursionLevel() { return --m_recursionLevel; } |
| 83 bool isHandlingRecursionLevelError() const { return m_isHandlingRecursionLev
elError; } | 87 bool isHandlingRecursionLevelError() const { return m_isHandlingRecursionLev
elError; } |
| 84 void setIsHandlingRecursionLevelError(bool value) { m_isHandlingRecursionLev
elError = value; } | 88 void setIsHandlingRecursionLevelError(bool value) { m_isHandlingRecursionLev
elError = value; } |
| 85 | 89 |
| 86 bool isReportingException() const { return m_isReportingException; } | 90 bool isReportingException() const { return m_isReportingException; } |
| 87 void setReportingException(bool value) { m_isReportingException = value; } | 91 void setReportingException(bool value) { m_isReportingException = value; } |
| 88 | 92 |
| 93 bool performingMicrotaskCheckpoint() const { return m_performingMicrotaskChe
ckpoint; } |
| 94 void setPerformingMicrotaskCheckpoint(bool performingMicrotaskCheckpoint) {
m_performingMicrotaskCheckpoint = performingMicrotaskCheckpoint; } |
| 95 |
| 96 #if ENABLE(ASSERT) |
| 97 int internalScriptRecursionLevel() const { return m_internalScriptRecursionL
evel; } |
| 98 int incrementInternalScriptRecursionLevel() { return ++m_internalScriptRecur
sionLevel; } |
| 99 int decrementInternalScriptRecursionLevel() { return --m_internalScriptRecur
sionLevel; } |
| 100 #endif |
| 101 |
| 89 V8HiddenValue* hiddenValue() { return m_hiddenValue.get(); } | 102 V8HiddenValue* hiddenValue() { return m_hiddenValue.get(); } |
| 90 | 103 |
| 91 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); |
| 92 v8::Local<v8::FunctionTemplate> existingDOMTemplate(const void* domTemplateK
ey); | 105 v8::Local<v8::FunctionTemplate> existingDOMTemplate(const void* domTemplateK
ey); |
| 93 void setDOMTemplate(const void* domTemplateKey, v8::Local<v8::FunctionTempla
te>); | 106 void setDOMTemplate(const void* domTemplateKey, v8::Local<v8::FunctionTempla
te>); |
| 94 | 107 |
| 95 bool hasInstance(const WrapperTypeInfo* untrusted, v8::Local<v8::Value>); | 108 bool hasInstance(const WrapperTypeInfo* untrusted, v8::Local<v8::Value>); |
| 96 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>); |
| 97 | 110 |
| 98 v8::Local<v8::Context> ensureScriptRegexpContext(); | 111 v8::Local<v8::Context> ensureScriptRegexpContext(); |
| (...skipping 12 matching lines...) Expand all Loading... |
| 111 | 124 |
| 112 private: | 125 private: |
| 113 V8PerIsolateData(); | 126 V8PerIsolateData(); |
| 114 ~V8PerIsolateData(); | 127 ~V8PerIsolateData(); |
| 115 | 128 |
| 116 typedef HashMap<const void*, v8::Eternal<v8::FunctionTemplate>> DOMTemplateM
ap; | 129 typedef HashMap<const void*, v8::Eternal<v8::FunctionTemplate>> DOMTemplateM
ap; |
| 117 DOMTemplateMap& currentDOMTemplateMap(); | 130 DOMTemplateMap& currentDOMTemplateMap(); |
| 118 bool hasInstance(const WrapperTypeInfo* untrusted, v8::Local<v8::Value>, DOM
TemplateMap&); | 131 bool hasInstance(const WrapperTypeInfo* untrusted, v8::Local<v8::Value>, DOM
TemplateMap&); |
| 119 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&); |
| 120 | 133 |
| 134 bool m_destructionPending; |
| 121 OwnPtr<gin::IsolateHolder> m_isolateHolder; | 135 OwnPtr<gin::IsolateHolder> m_isolateHolder; |
| 122 DOMTemplateMap m_domTemplateMapForMainWorld; | 136 DOMTemplateMap m_domTemplateMapForMainWorld; |
| 123 DOMTemplateMap m_domTemplateMapForNonMainWorld; | 137 DOMTemplateMap m_domTemplateMapForNonMainWorld; |
| 124 OwnPtr<StringCache> m_stringCache; | 138 OwnPtr<StringCache> m_stringCache; |
| 125 OwnPtr<V8HiddenValue> m_hiddenValue; | 139 OwnPtr<V8HiddenValue> m_hiddenValue; |
| 126 ScopedPersistent<v8::Value> m_liveRoot; | 140 ScopedPersistent<v8::Value> m_liveRoot; |
| 127 RefPtr<ScriptState> m_scriptRegexpScriptState; | 141 RefPtr<ScriptState> m_scriptRegexpScriptState; |
| 128 | 142 |
| 129 bool m_constructorMode; | 143 bool m_constructorMode; |
| 130 friend class ConstructorMode; | 144 friend class ConstructorMode; |
| 131 | 145 |
| 146 int m_recursionLevel; |
| 132 bool m_isHandlingRecursionLevelError; | 147 bool m_isHandlingRecursionLevelError; |
| 133 bool m_isReportingException; | 148 bool m_isReportingException; |
| 134 | 149 |
| 150 #if ENABLE(ASSERT) |
| 151 int m_internalScriptRecursionLevel; |
| 152 #endif |
| 153 bool m_performingMicrotaskCheckpoint; |
| 154 |
| 135 Vector<OwnPtr<EndOfScopeTask>> m_endOfScopeTasks; | 155 Vector<OwnPtr<EndOfScopeTask>> m_endOfScopeTasks; |
| 136 OwnPtr<ThreadDebugger> m_threadDebugger; | 156 OwnPtr<ThreadDebugger> m_threadDebugger; |
| 137 }; | 157 }; |
| 138 | 158 |
| 139 } // namespace blink | 159 } // namespace blink |
| 140 | 160 |
| 141 #endif // V8PerIsolateData_h | 161 #endif // V8PerIsolateData_h |
| OLD | NEW |