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

Side by Side Diff: third_party/WebKit/Source/core/dom/ElementData.h

Issue 1884083002: Revert of Rename Heap to ThreadHeap (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 * Copyright (C) 2014 Apple Inc. All rights reserved. 3 * Copyright (C) 2014 Apple Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 static ShareableElementData* createWithAttributes(const Vector<Attribute>&); 128 static ShareableElementData* createWithAttributes(const Vector<Attribute>&);
129 129
130 explicit ShareableElementData(const Vector<Attribute>&); 130 explicit ShareableElementData(const Vector<Attribute>&);
131 explicit ShareableElementData(const UniqueElementData&); 131 explicit ShareableElementData(const UniqueElementData&);
132 ~ShareableElementData(); 132 ~ShareableElementData();
133 133
134 DEFINE_INLINE_TRACE_AFTER_DISPATCH() { ElementData::traceAfterDispatch(visit or); } 134 DEFINE_INLINE_TRACE_AFTER_DISPATCH() { ElementData::traceAfterDispatch(visit or); }
135 135
136 // Add support for placement new as ShareableElementData is not allocated 136 // Add support for placement new as ShareableElementData is not allocated
137 // with a fixed size. Instead the allocated memory size is computed based on 137 // with a fixed size. Instead the allocated memory size is computed based on
138 // the number of attributes. This requires us to use ThreadHeap::allocate di rectly 138 // the number of attributes. This requires us to use Heap::allocate directly
139 // with the computed size and subsequently call placement new with the 139 // with the computed size and subsequently call placement new with the
140 // allocated memory address. 140 // allocated memory address.
141 void* operator new(std::size_t, void* location) 141 void* operator new(std::size_t, void* location)
142 { 142 {
143 return location; 143 return location;
144 } 144 }
145 145
146 AttributeCollection attributes() const; 146 AttributeCollection attributes() const;
147 147
148 Attribute m_attributeArray[0]; 148 Attribute m_attributeArray[0];
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 } 218 }
219 219
220 inline MutableAttributeCollection UniqueElementData::attributes() 220 inline MutableAttributeCollection UniqueElementData::attributes()
221 { 221 {
222 return MutableAttributeCollection(m_attributeVector); 222 return MutableAttributeCollection(m_attributeVector);
223 } 223 }
224 224
225 } // namespace blink 225 } // namespace blink
226 226
227 #endif // ElementData_h 227 #endif // ElementData_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/DocumentTest.cpp ('k') | third_party/WebKit/Source/core/dom/ElementData.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698