| 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 , m_stringCache(adoptPtr(new StringCache(isolate()))) | 70 , m_stringCache(adoptPtr(new StringCache(isolate()))) |
| 71 , m_hiddenValue(adoptPtr(new V8HiddenValue())) | 71 , m_hiddenValue(adoptPtr(new V8HiddenValue())) |
| 72 , m_constructorMode(ConstructorMode::CreateNewObject) | 72 , m_constructorMode(ConstructorMode::CreateNewObject) |
| 73 , m_recursionLevel(0) | 73 , m_recursionLevel(0) |
| 74 , m_isHandlingRecursionLevelError(false) | 74 , m_isHandlingRecursionLevelError(false) |
| 75 , m_isReportingException(false) | 75 , m_isReportingException(false) |
| 76 #if ENABLE(ASSERT) | 76 #if ENABLE(ASSERT) |
| 77 , m_internalScriptRecursionLevel(0) | 77 , m_internalScriptRecursionLevel(0) |
| 78 #endif | 78 #endif |
| 79 , m_performingMicrotaskCheckpoint(false) | 79 , m_performingMicrotaskCheckpoint(false) |
| 80 , m_debugServer(nullptr) |
| 80 { | 81 { |
| 81 // FIXME: Remove once all v8::Isolate::GetCurrent() calls are gone. | 82 // FIXME: Remove once all v8::Isolate::GetCurrent() calls are gone. |
| 82 isolate()->Enter(); | 83 isolate()->Enter(); |
| 83 #if ENABLE(ASSERT) | 84 #if ENABLE(ASSERT) |
| 84 // currentThread will always be non-null in production, but can be null in C
hromium unit tests. | 85 // currentThread will always be non-null in production, but can be null in C
hromium unit tests. |
| 85 if (blink::Platform::current()->currentThread()) | 86 if (blink::Platform::current()->currentThread()) |
| 86 isolate()->AddCallCompletedCallback(&assertV8RecursionScope); | 87 isolate()->AddCallCompletedCallback(&assertV8RecursionScope); |
| 87 #endif | 88 #endif |
| 88 if (isMainThread()) | 89 if (isMainThread()) |
| 89 mainThreadPerIsolateData = this; | 90 mainThreadPerIsolateData = this; |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 | 135 |
| 135 void V8PerIsolateData::destroy(v8::Isolate* isolate) | 136 void V8PerIsolateData::destroy(v8::Isolate* isolate) |
| 136 { | 137 { |
| 137 #if ENABLE(ASSERT) | 138 #if ENABLE(ASSERT) |
| 138 if (blink::Platform::current()->currentThread()) | 139 if (blink::Platform::current()->currentThread()) |
| 139 isolate->RemoveCallCompletedCallback(&assertV8RecursionScope); | 140 isolate->RemoveCallCompletedCallback(&assertV8RecursionScope); |
| 140 #endif | 141 #endif |
| 141 V8PerIsolateData* data = from(isolate); | 142 V8PerIsolateData* data = from(isolate); |
| 142 // FIXME: Remove once all v8::Isolate::GetCurrent() calls are gone. | 143 // FIXME: Remove once all v8::Isolate::GetCurrent() calls are gone. |
| 143 isolate->Exit(); | 144 isolate->Exit(); |
| 145 data->m_debugServer.clear(); |
| 144 delete data; | 146 delete data; |
| 145 } | 147 } |
| 146 | 148 |
| 147 V8PerIsolateData::DOMTemplateMap& V8PerIsolateData::currentDOMTemplateMap() | 149 V8PerIsolateData::DOMTemplateMap& V8PerIsolateData::currentDOMTemplateMap() |
| 148 { | 150 { |
| 149 if (DOMWrapperWorld::current(isolate()).isMainWorld()) | 151 if (DOMWrapperWorld::current(isolate()).isMainWorld()) |
| 150 return m_domTemplateMapForMainWorld; | 152 return m_domTemplateMapForMainWorld; |
| 151 return m_domTemplateMapForNonMainWorld; | 153 return m_domTemplateMapForNonMainWorld; |
| 152 } | 154 } |
| 153 | 155 |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 264 m_endOfScopeTasks.clear(); | 266 m_endOfScopeTasks.clear(); |
| 265 } | 267 } |
| 266 | 268 |
| 267 void V8PerIsolateData::setScriptDebugServer(PassOwnPtrWillBeRawPtr<ScriptDebugSe
rver> server) | 269 void V8PerIsolateData::setScriptDebugServer(PassOwnPtrWillBeRawPtr<ScriptDebugSe
rver> server) |
| 268 { | 270 { |
| 269 ASSERT(!m_debugServer); | 271 ASSERT(!m_debugServer); |
| 270 m_debugServer = server; | 272 m_debugServer = server; |
| 271 } | 273 } |
| 272 | 274 |
| 273 } // namespace blink | 275 } // namespace blink |
| OLD | NEW |