Chromium Code Reviews| Index: Source/core/dom/custom/CustomElementMicrotaskDispatcher.cpp |
| diff --git a/Source/core/dom/custom/CustomElementMicrotaskDispatcher.cpp b/Source/core/dom/custom/CustomElementMicrotaskDispatcher.cpp |
| index ca716e61001b11c4b98e170b4aa435a6073a4d09..cd4ce87c0f3d4826aa4542e9a38a6f796556b683 100644 |
| --- a/Source/core/dom/custom/CustomElementMicrotaskDispatcher.cpp |
| +++ b/Source/core/dom/custom/CustomElementMicrotaskDispatcher.cpp |
| @@ -27,11 +27,16 @@ CustomElementMicrotaskDispatcher::CustomElementMicrotaskDispatcher() |
| CustomElementMicrotaskDispatcher& CustomElementMicrotaskDispatcher::instance() |
| { |
| +#if ENABLE(OILPAN) |
| + DEFINE_STATIC_LOCAL(Persistent<CustomElementMicrotaskDispatcher>, instance, (new CustomElementMicrotaskDispatcher())); |
| + return *instance; |
| +#else |
| DEFINE_STATIC_LOCAL(CustomElementMicrotaskDispatcher, instance, ()); |
| return instance; |
| +#endif |
| } |
| -void CustomElementMicrotaskDispatcher::enqueue(HTMLImportLoader* importLoader, PassOwnPtr<CustomElementMicrotaskStep> step) |
| +void CustomElementMicrotaskDispatcher::enqueue(HTMLImportLoader* importLoader, PassOwnPtrWillBeRawPtr<CustomElementMicrotaskStep> step) |
| { |
| ASSERT(m_phase == Quiescent || m_phase == DispatchingCallbacks); |
| ensureMicrotaskScheduled(); |
| @@ -84,7 +89,7 @@ void CustomElementMicrotaskDispatcher::doDispatch() |
| m_resolutionAndImports->dispatch(); |
| m_phase = DispatchingCallbacks; |
| - for (Vector<CustomElementCallbackQueue*>::iterator it = m_elements.begin();it != m_elements.end(); ++it) { |
| + for (WillBeHeapVector<RawPtrWillBeMember<CustomElementCallbackQueue> >::iterator it = m_elements.begin();it != m_elements.end(); ++it) { |
|
haraken
2014/05/26 15:40:23
Nit: One space needed after "begin();"
sof
2014/05/26 16:41:08
Tidied.
|
| // Created callback may enqueue an attached callback. |
| CustomElementCallbackDispatcher::CallbackDeliveryScope scope; |
| (*it)->processInElementQueue(kMicrotaskQueueId); |
| @@ -95,6 +100,14 @@ void CustomElementMicrotaskDispatcher::doDispatch() |
| m_phase = Quiescent; |
| } |
| +void CustomElementMicrotaskDispatcher::trace(Visitor* visitor) |
| +{ |
| + visitor->trace(m_resolutionAndImports); |
| +#if ENABLE(OILPAN) |
| + visitor->trace(m_elements); |
| +#endif |
| +} |
| + |
| #if !defined(NDEBUG) |
| void CustomElementMicrotaskDispatcher::show() |
| { |