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

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

Issue 2027333003: Avoid unnecessary uses of GarbageCollectedFinalized<>. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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/CustomElementReactionStack.h" 5 #include "core/dom/custom/CustomElementReactionStack.h"
6 6
7 #include "core/dom/Element.h" 7 #include "core/dom/Element.h"
8 #include "core/dom/custom/CustomElementReactionQueue.h" 8 #include "core/dom/custom/CustomElementReactionQueue.h"
9 9
10 namespace blink { 10 namespace blink {
11 11
12 // TODO(dominicc): Consider using linked heap structures, avoiding 12 // TODO(dominicc): Consider using linked heap structures, avoiding
13 // finalizers, to make short-lived entries fast. 13 // finalizers, to make short-lived entries fast.
14 14
15 CustomElementReactionStack::CustomElementReactionStack() 15 CustomElementReactionStack::CustomElementReactionStack()
16 { 16 {
17 } 17 }
18 18
19 CustomElementReactionStack::~CustomElementReactionStack()
20 {
21 }
22
23 DEFINE_TRACE(CustomElementReactionStack) 19 DEFINE_TRACE(CustomElementReactionStack)
24 { 20 {
25 visitor->trace(m_map); 21 visitor->trace(m_map);
26 visitor->trace(m_stack); 22 visitor->trace(m_stack);
27 } 23 }
28 24
29 void CustomElementReactionStack::push() 25 void CustomElementReactionStack::push()
30 { 26 {
31 m_stack.append(nullptr); 27 m_stack.append(nullptr);
32 } 28 }
(...skipping 25 matching lines...) Expand all
58 CustomElementReactionQueue* reactions = m_map.get(element); 54 CustomElementReactionQueue* reactions = m_map.get(element);
59 if (!reactions) { 55 if (!reactions) {
60 reactions = new CustomElementReactionQueue(); 56 reactions = new CustomElementReactionQueue();
61 m_map.add(element, reactions); 57 m_map.add(element, reactions);
62 } 58 }
63 59
64 reactions->add(reaction); 60 reactions->add(reaction);
65 } 61 }
66 62
67 } // namespace blink 63 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698