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

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

Issue 296703009: Oilpan: move custom element objects to the heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix compilation issue pointed out by clang Created 6 years, 7 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 15 matching lines...) Expand all
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #include "config.h" 31 #include "config.h"
32 #include "core/dom/custom/CustomElementCallbackQueue.h" 32 #include "core/dom/custom/CustomElementCallbackQueue.h"
33 33
34 namespace WebCore { 34 namespace WebCore {
35 35
36 PassOwnPtr<CustomElementCallbackQueue> CustomElementCallbackQueue::create(PassRe fPtr<Element> element) 36 PassOwnPtrWillBeRawPtr<CustomElementCallbackQueue> CustomElementCallbackQueue::c reate(PassRefPtrWillBeRawPtr<Element> element)
37 { 37 {
38 return adoptPtr(new CustomElementCallbackQueue(element)); 38 return adoptPtrWillBeNoop(new CustomElementCallbackQueue(element));
39 } 39 }
40 40
41 CustomElementCallbackQueue::CustomElementCallbackQueue(PassRefPtr<Element> eleme nt) 41 CustomElementCallbackQueue::CustomElementCallbackQueue(PassRefPtrWillBeRawPtr<El ement> element)
42 : m_element(element) 42 : m_element(element)
43 , m_owner(-1) 43 , m_owner(-1)
44 , m_index(0) 44 , m_index(0)
45 , m_inCreatedCallback(false) 45 , m_inCreatedCallback(false)
46 { 46 {
47 } 47 }
48 48
49 bool CustomElementCallbackQueue::processInElementQueue(ElementQueueId caller) 49 bool CustomElementCallbackQueue::processInElementQueue(ElementQueueId caller)
50 { 50 {
51 ASSERT(!m_inCreatedCallback); 51 ASSERT(!m_inCreatedCallback);
(...skipping 13 matching lines...) Expand all
65 if (owner() == caller && m_index == m_queue.size()) { 65 if (owner() == caller && m_index == m_queue.size()) {
66 // This processInQueue exhausted the queue; shrink it. 66 // This processInQueue exhausted the queue; shrink it.
67 m_index = 0; 67 m_index = 0;
68 m_queue.resize(0); 68 m_queue.resize(0);
69 m_owner = -1; 69 m_owner = -1;
70 } 70 }
71 71
72 return didWork; 72 return didWork;
73 } 73 }
74 74
75 void CustomElementCallbackQueue::trace(Visitor* visitor)
76 {
77 visitor->trace(m_element);
78 }
79
75 } // namespace WebCore 80 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/dom/custom/CustomElementCallbackQueue.h ('k') | Source/core/dom/custom/CustomElementDescriptor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698