OLD | NEW |
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/V0CustomElementSyncMicrotaskQueue.h" | 5 #include "core/dom/custom/V0CustomElementSyncMicrotaskQueue.h" |
6 | 6 |
7 namespace blink { | 7 namespace blink { |
8 | 8 |
9 void V0CustomElementSyncMicrotaskQueue::enqueue( | 9 void V0CustomElementSyncMicrotaskQueue::enqueue( |
10 V0CustomElementMicrotaskStep* step) { | 10 V0CustomElementMicrotaskStep* step) { |
11 m_queue.push_back(step); | 11 m_queue.push_back(step); |
12 } | 12 } |
13 | 13 |
14 void V0CustomElementSyncMicrotaskQueue::doDispatch() { | 14 void V0CustomElementSyncMicrotaskQueue::doDispatch() { |
15 unsigned i; | 15 unsigned i; |
16 | 16 |
17 for (i = 0; i < m_queue.size(); ++i) { | 17 for (i = 0; i < m_queue.size(); ++i) { |
18 if (V0CustomElementMicrotaskStep::Processing == m_queue[i]->process()) | 18 if (V0CustomElementMicrotaskStep::Processing == m_queue[i]->process()) |
19 break; | 19 break; |
20 } | 20 } |
21 | 21 |
22 m_queue.remove(0, i); | 22 m_queue.erase(0, i); |
23 } | 23 } |
24 | 24 |
25 } // namespace blink | 25 } // namespace blink |
OLD | NEW |