Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(15)

Side by Side Diff: third_party/WebKit/Source/bindings/core/v8/ScriptWrappableVisitor.cpp

Issue 1966743004: Move tracking of ActiveScriptWrappables to V8PerIsolateData. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: lazy creation of map Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/ScriptWrappable.h" 9 #include "bindings/core/v8/ScriptWrappable.h"
10 #include "bindings/core/v8/WrapperTypeInfo.h" 10 #include "bindings/core/v8/WrapperTypeInfo.h"
11 #include "core/html/imports/HTMLImportsController.h" 11 #include "core/html/imports/HTMLImportsController.h"
12 #include "platform/heap/HeapPage.h" 12 #include "platform/heap/HeapPage.h"
13 13
14 namespace blink { 14 namespace blink {
15 15
16 ScriptWrappableVisitor::~ScriptWrappableVisitor() 16 ScriptWrappableVisitor::~ScriptWrappableVisitor()
17 { 17 {
18 } 18 }
19 19
20 void ScriptWrappableVisitor::TracePrologue() 20 void ScriptWrappableVisitor::TracePrologue()
21 { 21 {
22 m_tracingInProgress = true; 22 m_tracingInProgress = true;
23 ActiveScriptWrappable::traceActiveScriptWrappables(this); 23 ActiveScriptWrappable::traceActiveScriptWrappables(m_isolate, this);
24 } 24 }
25 25
26 void ScriptWrappableVisitor::TraceEpilogue() 26 void ScriptWrappableVisitor::TraceEpilogue()
27 { 27 {
28 for (auto header : m_headersToUnmark) 28 for (auto header : m_headersToUnmark)
29 header->unmarkWrapperHeader(); 29 header->unmarkWrapperHeader();
30 30
31 m_headersToUnmark.clear(); 31 m_headersToUnmark.clear();
32 m_tracingInProgress = false; 32 m_tracingInProgress = false;
33 } 33 }
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 void ScriptWrappableVisitor::dispatchTraceWrappers(const className* traceable) c onst \ 104 void ScriptWrappableVisitor::dispatchTraceWrappers(const className* traceable) c onst \
105 { \ 105 { \
106 traceable->traceWrappers(this); \ 106 traceable->traceWrappers(this); \
107 } \ 107 } \
108 108
109 WRAPPER_VISITOR_SPECIAL_CLASSES(DEFINE_DISPATCH_TRACE_WRAPPERS); 109 WRAPPER_VISITOR_SPECIAL_CLASSES(DEFINE_DISPATCH_TRACE_WRAPPERS);
110 110
111 #undef DEFINE_DISPATCH_TRACE_WRAPPERS 111 #undef DEFINE_DISPATCH_TRACE_WRAPPERS
112 112
113 } // namespace blink 113 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698