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

Side by Side Diff: third_party/WebKit/Source/core/dom/custom/CustomElementRegistry.cpp

Issue 2592653002: [wrapper-tracing] Trace CustomElementReactionStack (Closed)
Patch Set: Created 3 years, 12 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 "core/dom/custom/CustomElementRegistry.h" 5 #include "core/dom/custom/CustomElementRegistry.h"
6 6
7 #include "bindings/core/v8/ExceptionState.h" 7 #include "bindings/core/v8/ExceptionState.h"
8 #include "bindings/core/v8/ScriptCustomElementDefinitionBuilder.h" 8 #include "bindings/core/v8/ScriptCustomElementDefinitionBuilder.h"
9 #include "bindings/core/v8/ScriptPromise.h" 9 #include "bindings/core/v8/ScriptPromise.h"
10 #include "bindings/core/v8/ScriptPromiseResolver.h" 10 #include "bindings/core/v8/ScriptPromiseResolver.h"
11 #include "core/HTMLElementTypeHelpers.h" 11 #include "core/HTMLElementTypeHelpers.h"
12 #include "core/dom/Document.h" 12 #include "core/dom/Document.h"
13 #include "core/dom/Element.h" 13 #include "core/dom/Element.h"
14 #include "core/dom/ElementDefinitionOptions.h" 14 #include "core/dom/ElementDefinitionOptions.h"
15 #include "core/dom/ExceptionCode.h" 15 #include "core/dom/ExceptionCode.h"
16 #include "core/dom/custom/CEReactionsScope.h" 16 #include "core/dom/custom/CEReactionsScope.h"
17 #include "core/dom/custom/CustomElement.h" 17 #include "core/dom/custom/CustomElement.h"
18 #include "core/dom/custom/CustomElementDefinition.h" 18 #include "core/dom/custom/CustomElementDefinition.h"
19 #include "core/dom/custom/CustomElementDefinitionBuilder.h" 19 #include "core/dom/custom/CustomElementDefinitionBuilder.h"
20 #include "core/dom/custom/CustomElementDescriptor.h" 20 #include "core/dom/custom/CustomElementDescriptor.h"
21 #include "core/dom/custom/CustomElementReactionStack.h"
21 #include "core/dom/custom/CustomElementUpgradeReaction.h" 22 #include "core/dom/custom/CustomElementUpgradeReaction.h"
22 #include "core/dom/custom/CustomElementUpgradeSorter.h" 23 #include "core/dom/custom/CustomElementUpgradeSorter.h"
23 #include "core/dom/custom/V0CustomElementRegistrationContext.h" 24 #include "core/dom/custom/V0CustomElementRegistrationContext.h"
24 #include "core/frame/LocalDOMWindow.h" 25 #include "core/frame/LocalDOMWindow.h"
25 #include "platform/tracing/TraceEvent.h" 26 #include "platform/tracing/TraceEvent.h"
26 #include "wtf/Allocator.h" 27 #include "wtf/Allocator.h"
27 28
28 namespace blink { 29 namespace blink {
29 30
30 // Returns true if |name| is invalid. 31 // Returns true if |name| is invalid.
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 m_upgradeCandidates(new UpgradeCandidateMap()) {} 84 m_upgradeCandidates(new UpgradeCandidateMap()) {}
84 85
85 DEFINE_TRACE(CustomElementRegistry) { 86 DEFINE_TRACE(CustomElementRegistry) {
86 visitor->trace(m_definitions); 87 visitor->trace(m_definitions);
87 visitor->trace(m_owner); 88 visitor->trace(m_owner);
88 visitor->trace(m_v0); 89 visitor->trace(m_v0);
89 visitor->trace(m_upgradeCandidates); 90 visitor->trace(m_upgradeCandidates);
90 visitor->trace(m_whenDefinedPromiseMap); 91 visitor->trace(m_whenDefinedPromiseMap);
91 } 92 }
92 93
94 DEFINE_TRACE_WRAPPERS(CustomElementRegistry) {
95 visitor->traceWrappers(&CustomElementReactionStack::current());
96 }
97
93 CustomElementDefinition* CustomElementRegistry::define( 98 CustomElementDefinition* CustomElementRegistry::define(
94 ScriptState* scriptState, 99 ScriptState* scriptState,
95 const AtomicString& name, 100 const AtomicString& name,
96 const ScriptValue& constructor, 101 const ScriptValue& constructor,
97 const ElementDefinitionOptions& options, 102 const ElementDefinitionOptions& options,
98 ExceptionState& exceptionState) { 103 ExceptionState& exceptionState) {
99 ScriptCustomElementDefinitionBuilder builder(scriptState, this, constructor, 104 ScriptCustomElementDefinitionBuilder builder(scriptState, this, constructor,
100 exceptionState); 105 exceptionState);
101 return define(name, builder, options, exceptionState); 106 return define(name, builder, options, exceptionState);
102 } 107 }
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 m_upgradeCandidates->remove(it); 305 m_upgradeCandidates->remove(it);
301 306
302 Document* document = m_owner->document(); 307 Document* document = m_owner->document();
303 if (!document) 308 if (!document)
304 return; 309 return;
305 310
306 sorter.sorted(elements, document); 311 sorter.sorted(elements, document);
307 } 312 }
308 313
309 } // namespace blink 314 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698