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

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

Issue 2574773002: Migrate WTF::Vector::append() to ::push_back() [part 4 of N] (Closed)
Patch Set: rebase Created 4 years 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/V0CustomElementMicrotaskDispatcher.h" 5 #include "core/dom/custom/V0CustomElementMicrotaskDispatcher.h"
6 6
7 #include "bindings/core/v8/Microtask.h" 7 #include "bindings/core/v8/Microtask.h"
8 #include "core/dom/custom/V0CustomElementCallbackQueue.h" 8 #include "core/dom/custom/V0CustomElementCallbackQueue.h"
9 #include "core/dom/custom/V0CustomElementMicrotaskImportStep.h" 9 #include "core/dom/custom/V0CustomElementMicrotaskImportStep.h"
10 #include "core/dom/custom/V0CustomElementProcessingStack.h" 10 #include "core/dom/custom/V0CustomElementProcessingStack.h"
(...skipping 10 matching lines...) Expand all
21 V0CustomElementMicrotaskDispatcher::instance() { 21 V0CustomElementMicrotaskDispatcher::instance() {
22 DEFINE_STATIC_LOCAL(V0CustomElementMicrotaskDispatcher, instance, 22 DEFINE_STATIC_LOCAL(V0CustomElementMicrotaskDispatcher, instance,
23 (new V0CustomElementMicrotaskDispatcher)); 23 (new V0CustomElementMicrotaskDispatcher));
24 return instance; 24 return instance;
25 } 25 }
26 26
27 void V0CustomElementMicrotaskDispatcher::enqueue( 27 void V0CustomElementMicrotaskDispatcher::enqueue(
28 V0CustomElementCallbackQueue* queue) { 28 V0CustomElementCallbackQueue* queue) {
29 ensureMicrotaskScheduledForElementQueue(); 29 ensureMicrotaskScheduledForElementQueue();
30 queue->setOwner(kMicrotaskQueueId); 30 queue->setOwner(kMicrotaskQueueId);
31 m_elements.append(queue); 31 m_elements.push_back(queue);
32 } 32 }
33 33
34 void V0CustomElementMicrotaskDispatcher:: 34 void V0CustomElementMicrotaskDispatcher::
35 ensureMicrotaskScheduledForElementQueue() { 35 ensureMicrotaskScheduledForElementQueue() {
36 DCHECK(m_phase == Quiescent || m_phase == Resolving); 36 DCHECK(m_phase == Quiescent || m_phase == Resolving);
37 ensureMicrotaskScheduled(); 37 ensureMicrotaskScheduled();
38 } 38 }
39 39
40 void V0CustomElementMicrotaskDispatcher::ensureMicrotaskScheduled() { 40 void V0CustomElementMicrotaskDispatcher::ensureMicrotaskScheduled() {
41 if (!m_hasScheduledMicrotask) { 41 if (!m_hasScheduledMicrotask) {
(...skipping 30 matching lines...) Expand all
72 m_elements.clear(); 72 m_elements.clear();
73 V0CustomElementScheduler::microtaskDispatcherDidFinish(); 73 V0CustomElementScheduler::microtaskDispatcherDidFinish();
74 m_phase = Quiescent; 74 m_phase = Quiescent;
75 } 75 }
76 76
77 DEFINE_TRACE(V0CustomElementMicrotaskDispatcher) { 77 DEFINE_TRACE(V0CustomElementMicrotaskDispatcher) {
78 visitor->trace(m_elements); 78 visitor->trace(m_elements);
79 } 79 }
80 80
81 } // namespace blink 81 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698