OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "bindings/core/v8/ScriptWrappableVisitor.h" | 5 #include "bindings/core/v8/ScriptWrappableVisitor.h" |
6 | 6 |
7 #include "bindings/core/v8/ActiveScriptWrappable.h" | 7 #include "bindings/core/v8/ActiveScriptWrappable.h" |
8 #include "bindings/core/v8/DOMWrapperWorld.h" | 8 #include "bindings/core/v8/DOMWrapperWorld.h" |
9 #include "bindings/core/v8/ScopedPersistent.h" | 9 #include "bindings/core/v8/ScopedPersistent.h" |
10 #include "bindings/core/v8/ScriptWrappableVisitorVerifier.h" | 10 #include "bindings/core/v8/ScriptWrappableVisitorVerifier.h" |
(...skipping 27 matching lines...) Expand all Loading... |
38 CHECK(!m_shouldCleanup); | 38 CHECK(!m_shouldCleanup); |
39 CHECK(m_headersToUnmark.isEmpty()); | 39 CHECK(m_headersToUnmark.isEmpty()); |
40 CHECK(m_markingDeque.isEmpty()); | 40 CHECK(m_markingDeque.isEmpty()); |
41 CHECK(m_verifierDeque.isEmpty()); | 41 CHECK(m_verifierDeque.isEmpty()); |
42 m_tracingInProgress = true; | 42 m_tracingInProgress = true; |
43 } | 43 } |
44 | 44 |
45 void ScriptWrappableVisitor::EnterFinalPause() { | 45 void ScriptWrappableVisitor::EnterFinalPause() { |
46 CHECK(ThreadState::current()); | 46 CHECK(ThreadState::current()); |
47 CHECK(!ThreadState::current()->isWrapperTracingForbidden()); | 47 CHECK(!ThreadState::current()->isWrapperTracingForbidden()); |
48 ActiveScriptWrappable::traceActiveScriptWrappables(m_isolate, this); | 48 ActiveScriptWrappableBase::traceActiveScriptWrappables(m_isolate, this); |
49 } | 49 } |
50 | 50 |
51 void ScriptWrappableVisitor::TraceEpilogue() { | 51 void ScriptWrappableVisitor::TraceEpilogue() { |
52 CHECK(ThreadState::current()); | 52 CHECK(ThreadState::current()); |
53 CHECK(!ThreadState::current()->isWrapperTracingForbidden()); | 53 CHECK(!ThreadState::current()->isWrapperTracingForbidden()); |
54 DCHECK(m_markingDeque.isEmpty()); | 54 DCHECK(m_markingDeque.isEmpty()); |
55 #if DCHECK_IS_ON() | 55 #if DCHECK_IS_ON() |
56 ScriptWrappableVisitorVerifier verifier; | 56 ScriptWrappableVisitorVerifier verifier; |
57 for (auto& markingData : m_verifierDeque) { | 57 for (auto& markingData : m_verifierDeque) { |
58 markingData.traceWrappers(&verifier); | 58 markingData.traceWrappers(&verifier); |
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
300 V8PerIsolateData::from(isolate)->scriptWrappableVisitor(); | 300 V8PerIsolateData::from(isolate)->scriptWrappableVisitor(); |
301 if (scriptWrappableVisitor) | 301 if (scriptWrappableVisitor) |
302 scriptWrappableVisitor->performCleanup(); | 302 scriptWrappableVisitor->performCleanup(); |
303 } | 303 } |
304 | 304 |
305 WrapperVisitor* ScriptWrappableVisitor::currentVisitor(v8::Isolate* isolate) { | 305 WrapperVisitor* ScriptWrappableVisitor::currentVisitor(v8::Isolate* isolate) { |
306 return V8PerIsolateData::from(isolate)->scriptWrappableVisitor(); | 306 return V8PerIsolateData::from(isolate)->scriptWrappableVisitor(); |
307 } | 307 } |
308 | 308 |
309 } // namespace blink | 309 } // namespace blink |
OLD | NEW |