| 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 { | 57 { |
| 58 ASSERT(isolate); | 58 ASSERT(isolate); |
| 59 ASSERT(isolate->GetData(gin::kEmbedderBlink)); | 59 ASSERT(isolate->GetData(gin::kEmbedderBlink)); |
| 60 return static_cast<V8PerIsolateData*>(isolate->GetData(gin::kEmbedderBli
nk)); | 60 return static_cast<V8PerIsolateData*>(isolate->GetData(gin::kEmbedderBli
nk)); |
| 61 } | 61 } |
| 62 | 62 |
| 63 static void willBeDestroyed(v8::Isolate*); | 63 static void willBeDestroyed(v8::Isolate*); |
| 64 static void destroy(v8::Isolate*); | 64 static void destroy(v8::Isolate*); |
| 65 static v8::Isolate* mainThreadIsolate(); | 65 static v8::Isolate* mainThreadIsolate(); |
| 66 | 66 |
| 67 bool destructionPending() const { return m_destructionPending; } |
| 67 v8::Isolate* isolate() { return m_isolateHolder->isolate(); } | 68 v8::Isolate* isolate() { return m_isolateHolder->isolate(); } |
| 68 | 69 |
| 69 v8::Handle<v8::FunctionTemplate> toStringTemplate(); | 70 v8::Handle<v8::FunctionTemplate> toStringTemplate(); |
| 70 | 71 |
| 71 StringCache* stringCache() { return m_stringCache.get(); } | 72 StringCache* stringCache() { return m_stringCache.get(); } |
| 72 | 73 |
| 73 v8::Persistent<v8::Value>& ensureLiveRoot(); | 74 v8::Persistent<v8::Value>& ensureLiveRoot(); |
| 74 | 75 |
| 75 int recursionLevel() const { return m_recursionLevel; } | 76 int recursionLevel() const { return m_recursionLevel; } |
| 76 int incrementRecursionLevel() { return ++m_recursionLevel; } | 77 int incrementRecursionLevel() { return ++m_recursionLevel; } |
| (...skipping 29 matching lines...) Expand all Loading... |
| 106 | 107 |
| 107 private: | 108 private: |
| 108 V8PerIsolateData(); | 109 V8PerIsolateData(); |
| 109 ~V8PerIsolateData(); | 110 ~V8PerIsolateData(); |
| 110 | 111 |
| 111 typedef HashMap<const void*, v8::Eternal<v8::FunctionTemplate> > DOMTemplate
Map; | 112 typedef HashMap<const void*, v8::Eternal<v8::FunctionTemplate> > DOMTemplate
Map; |
| 112 DOMTemplateMap& currentDOMTemplateMap(); | 113 DOMTemplateMap& currentDOMTemplateMap(); |
| 113 bool hasInstance(const WrapperTypeInfo*, v8::Handle<v8::Value>, DOMTemplateM
ap&); | 114 bool hasInstance(const WrapperTypeInfo*, v8::Handle<v8::Value>, DOMTemplateM
ap&); |
| 114 v8::Handle<v8::Object> findInstanceInPrototypeChain(const WrapperTypeInfo*,
v8::Handle<v8::Value>, DOMTemplateMap&); | 115 v8::Handle<v8::Object> findInstanceInPrototypeChain(const WrapperTypeInfo*,
v8::Handle<v8::Value>, DOMTemplateMap&); |
| 115 | 116 |
| 117 bool m_destructionPending; |
| 116 OwnPtr<gin::IsolateHolder> m_isolateHolder; | 118 OwnPtr<gin::IsolateHolder> m_isolateHolder; |
| 117 DOMTemplateMap m_domTemplateMapForMainWorld; | 119 DOMTemplateMap m_domTemplateMapForMainWorld; |
| 118 DOMTemplateMap m_domTemplateMapForNonMainWorld; | 120 DOMTemplateMap m_domTemplateMapForNonMainWorld; |
| 119 ScopedPersistent<v8::FunctionTemplate> m_toStringTemplate; | 121 ScopedPersistent<v8::FunctionTemplate> m_toStringTemplate; |
| 120 OwnPtr<StringCache> m_stringCache; | 122 OwnPtr<StringCache> m_stringCache; |
| 121 OwnPtr<V8HiddenValue> m_hiddenValue; | 123 OwnPtr<V8HiddenValue> m_hiddenValue; |
| 122 ScopedPersistent<v8::Value> m_liveRoot; | 124 ScopedPersistent<v8::Value> m_liveRoot; |
| 123 RefPtr<ScriptState> m_scriptRegexpScriptState; | 125 RefPtr<ScriptState> m_scriptRegexpScriptState; |
| 124 | 126 |
| 125 const char* m_previousSamplingState; | 127 const char* m_previousSamplingState; |
| 126 | 128 |
| 127 bool m_constructorMode; | 129 bool m_constructorMode; |
| 128 friend class ConstructorMode; | 130 friend class ConstructorMode; |
| 129 | 131 |
| 130 int m_recursionLevel; | 132 int m_recursionLevel; |
| 131 bool m_isHandlingRecursionLevelError; | 133 bool m_isHandlingRecursionLevelError; |
| 132 | 134 |
| 133 #if ENABLE(ASSERT) | 135 #if ENABLE(ASSERT) |
| 134 int m_internalScriptRecursionLevel; | 136 int m_internalScriptRecursionLevel; |
| 135 #endif | 137 #endif |
| 136 OwnPtr<GCEventData> m_gcEventData; | 138 OwnPtr<GCEventData> m_gcEventData; |
| 137 bool m_performingMicrotaskCheckpoint; | 139 bool m_performingMicrotaskCheckpoint; |
| 138 | 140 |
| 139 OwnPtr<IDBPendingTransactionMonitor> m_idbPendingTransactionMonitor; | 141 OwnPtr<IDBPendingTransactionMonitor> m_idbPendingTransactionMonitor; |
| 140 }; | 142 }; |
| 141 | 143 |
| 142 } // namespace blink | 144 } // namespace blink |
| 143 | 145 |
| 144 #endif // V8PerIsolateData_h | 146 #endif // V8PerIsolateData_h |
| OLD | NEW |