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

Side by Side Diff: Source/core/dom/custom/CustomElementMicrotaskRunQueue.cpp

Issue 1206503003: Oilpan: make custom element microtask dispatching lazy sweep savvy. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: eagerly finalize run queue (and weak ptr) Created 5 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
« no previous file with comments | « Source/core/dom/custom/CustomElementMicrotaskRunQueue.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "config.h" 5 #include "config.h"
6 #include "core/dom/custom/CustomElementMicrotaskRunQueue.h" 6 #include "core/dom/custom/CustomElementMicrotaskRunQueue.h"
7 7
8 #include "core/dom/Microtask.h" 8 #include "core/dom/Microtask.h"
9 #include "core/dom/custom/CustomElementAsyncImportMicrotaskQueue.h" 9 #include "core/dom/custom/CustomElementAsyncImportMicrotaskQueue.h"
10 #include "core/dom/custom/CustomElementSyncMicrotaskQueue.h" 10 #include "core/dom/custom/CustomElementSyncMicrotaskQueue.h"
11 #include "core/html/imports/HTMLImportLoader.h" 11 #include "core/html/imports/HTMLImportLoader.h"
12 12
13 #include <stdio.h>
14
15 namespace blink { 13 namespace blink {
16 14
17 DEFINE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(CustomElementMicrotaskRunQueue) 15 DEFINE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(CustomElementMicrotaskRunQueue)
18 16
19 CustomElementMicrotaskRunQueue::CustomElementMicrotaskRunQueue() 17 CustomElementMicrotaskRunQueue::CustomElementMicrotaskRunQueue()
20 : m_weakFactory(this) 18 : m_weakFactory(this)
21 , m_syncQueue(CustomElementSyncMicrotaskQueue::create()) 19 , m_syncQueue(CustomElementSyncMicrotaskQueue::create())
22 , m_asyncQueue(CustomElementAsyncImportMicrotaskQueue::create()) 20 , m_asyncQueue(CustomElementAsyncImportMicrotaskQueue::create())
23 , m_dispatchIsPending(false) 21 , m_dispatchIsPending(false)
24 { 22 {
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 if (m_syncQueue->isEmpty()) 65 if (m_syncQueue->isEmpty())
68 m_asyncQueue->dispatch(); 66 m_asyncQueue->dispatch();
69 } 67 }
70 68
71 bool CustomElementMicrotaskRunQueue::isEmpty() const 69 bool CustomElementMicrotaskRunQueue::isEmpty() const
72 { 70 {
73 return m_syncQueue->isEmpty() && m_asyncQueue->isEmpty(); 71 return m_syncQueue->isEmpty() && m_asyncQueue->isEmpty();
74 } 72 }
75 73
76 } // namespace blink 74 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/dom/custom/CustomElementMicrotaskRunQueue.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698