| 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/V0CustomElementMicrotaskQueueBase.h" | 5 #include "core/dom/custom/V0CustomElementMicrotaskQueueBase.h" |
| 6 | 6 |
| 7 #include "core/dom/custom/V0CustomElementProcessingStack.h" | 7 #include "core/dom/custom/V0CustomElementProcessingStack.h" |
| 8 | 8 |
| 9 namespace blink { | 9 namespace blink { |
| 10 | 10 |
| 11 void V0CustomElementMicrotaskQueueBase::dispatch() { | 11 void V0CustomElementMicrotaskQueueBase::dispatch() { |
| 12 RELEASE_ASSERT(!m_inDispatch); | 12 RELEASE_ASSERT(!m_inDispatch); |
| 13 m_inDispatch = true; | 13 m_inDispatch = true; |
| 14 doDispatch(); | 14 doDispatch(); |
| 15 m_inDispatch = false; | 15 m_inDispatch = false; |
| 16 } | 16 } |
| 17 | 17 |
| 18 DEFINE_TRACE(V0CustomElementMicrotaskQueueBase) { | 18 DEFINE_TRACE(V0CustomElementMicrotaskQueueBase) { |
| 19 visitor->trace(m_queue); | 19 visitor->trace(m_queue); |
| 20 } | 20 } |
| 21 | 21 |
| 22 #if !defined(NDEBUG) | 22 #if !defined(NDEBUG) |
| 23 void V0CustomElementMicrotaskQueueBase::show(unsigned indent) { | 23 void V0CustomElementMicrotaskQueueBase::show(unsigned indent) { |
| 24 for (unsigned q = 0; q < m_queue.size(); ++q) { | 24 for (const auto& step : m_queue) { |
| 25 if (m_queue[q]) | 25 if (step) |
| 26 m_queue[q]->show(indent); | 26 step->show(indent); |
| 27 else | 27 else |
| 28 fprintf(stderr, "%*snull\n", indent, ""); | 28 fprintf(stderr, "%*snull\n", indent, ""); |
| 29 } | 29 } |
| 30 } | 30 } |
| 31 #endif | 31 #endif |
| 32 | 32 |
| 33 } // namespace blink | 33 } // namespace blink |
| OLD | NEW |