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

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

Issue 1477023003: Refactor the Heap into ThreadHeap to prepare for per thread heaps Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 static PassRefPtrWillBeRawPtr<ShareableElementData> createWithAttributes(con st Vector<Attribute>&); 129 static PassRefPtrWillBeRawPtr<ShareableElementData> createWithAttributes(con st Vector<Attribute>&);
130 130
131 explicit ShareableElementData(const Vector<Attribute>&); 131 explicit ShareableElementData(const Vector<Attribute>&);
132 explicit ShareableElementData(const UniqueElementData&); 132 explicit ShareableElementData(const UniqueElementData&);
133 ~ShareableElementData(); 133 ~ShareableElementData();
134 134
135 DEFINE_INLINE_TRACE_AFTER_DISPATCH() { ElementData::traceAfterDispatch(visit or); } 135 DEFINE_INLINE_TRACE_AFTER_DISPATCH() { ElementData::traceAfterDispatch(visit or); }
136 136
137 // Add support for placement new as ShareableElementData is not allocated 137 // Add support for placement new as ShareableElementData is not allocated
138 // with a fixed size. Instead the allocated memory size is computed based on 138 // with a fixed size. Instead the allocated memory size is computed based on
139 // the number of attributes. This requires us to use Heap::allocate directly 139 // the number of attributes. This requires us to use ThreadHeap::allocate di rectly
140 // with the computed size and subsequently call placement new with the 140 // with the computed size and subsequently call placement new with the
141 // allocated memory address. 141 // allocated memory address.
142 void* operator new(std::size_t, void* location) 142 void* operator new(std::size_t, void* location)
143 { 143 {
144 return location; 144 return location;
145 } 145 }
146 146
147 AttributeCollection attributes() const; 147 AttributeCollection attributes() const;
148 148
149 Attribute m_attributeArray[0]; 149 Attribute m_attributeArray[0];
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 } 219 }
220 220
221 inline MutableAttributeCollection UniqueElementData::attributes() 221 inline MutableAttributeCollection UniqueElementData::attributes()
222 { 222 {
223 return MutableAttributeCollection(m_attributeVector); 223 return MutableAttributeCollection(m_attributeVector);
224 } 224 }
225 225
226 } // namespace blink 226 } // namespace blink
227 227
228 #endif // ElementData_h 228 #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