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

Side by Side Diff: Source/core/dom/ChildListMutationScope.cpp

Issue 280123002: Oilpan: move LiveNodeList collections to the heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Have NodeRareData clear out NodeListsNodeData instead. 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
« no previous file with comments | « Source/core/accessibility/AXTable.cpp ('k') | Source/core/dom/ChildNodeList.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 m_nextSibling = child->nextSibling(); 119 m_nextSibling = child->nextSibling();
120 120
121 m_removedNodes.append(child.release()); 121 m_removedNodes.append(child.release());
122 } 122 }
123 123
124 void ChildListMutationAccumulator::enqueueMutationRecord() 124 void ChildListMutationAccumulator::enqueueMutationRecord()
125 { 125 {
126 ASSERT(hasObservers()); 126 ASSERT(hasObservers());
127 ASSERT(!isEmpty()); 127 ASSERT(!isEmpty());
128 128
129 RefPtr<NodeList> addedNodes = StaticNodeList::adopt(m_addedNodes); 129 RefPtrWillBeRawPtr<NodeList> addedNodes = StaticNodeList::adopt(m_addedNodes );
130 RefPtr<NodeList> removedNodes = StaticNodeList::adopt(m_removedNodes); 130 RefPtrWillBeRawPtr<NodeList> removedNodes = StaticNodeList::adopt(m_removedN odes);
131 RefPtrWillBeRawPtr<MutationRecord> record = MutationRecord::createChildList( m_target, addedNodes.release(), removedNodes.release(), m_previousSibling.releas e(), m_nextSibling.release()); 131 RefPtrWillBeRawPtr<MutationRecord> record = MutationRecord::createChildList( m_target, addedNodes.release(), removedNodes.release(), m_previousSibling.releas e(), m_nextSibling.release());
132 m_observers->enqueueMutationRecord(record.release()); 132 m_observers->enqueueMutationRecord(record.release());
133 m_lastAdded = 0; 133 m_lastAdded = 0;
134 ASSERT(isEmpty()); 134 ASSERT(isEmpty());
135 } 135 }
136 136
137 bool ChildListMutationAccumulator::isEmpty() 137 bool ChildListMutationAccumulator::isEmpty()
138 { 138 {
139 bool result = m_removedNodes.isEmpty() && m_addedNodes.isEmpty(); 139 bool result = m_removedNodes.isEmpty() && m_addedNodes.isEmpty();
140 #ifndef NDEBUG 140 #ifndef NDEBUG
141 if (result) { 141 if (result) {
142 ASSERT(!m_previousSibling); 142 ASSERT(!m_previousSibling);
143 ASSERT(!m_nextSibling); 143 ASSERT(!m_nextSibling);
144 ASSERT(!m_lastAdded); 144 ASSERT(!m_lastAdded);
145 } 145 }
146 #endif 146 #endif
147 return result; 147 return result;
148 } 148 }
149 149
150 } // namespace WebCore 150 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/accessibility/AXTable.cpp ('k') | Source/core/dom/ChildNodeList.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698