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

Unified Diff: Source/platform/heap/Heap.h

Issue 559733004: remove template c++11'ism in Heap.h (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: remove code duplication Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/heap/Heap.h
diff --git a/Source/platform/heap/Heap.h b/Source/platform/heap/Heap.h
index af83b7c11ac4bdb74534cc6b3b538f6546208e7d..f4407e3e525a5ce9ee5314b8c1d611fc1452e259 100644
--- a/Source/platform/heap/Heap.h
+++ b/Source/platform/heap/Heap.h
@@ -1103,7 +1103,10 @@ public:
static bool weakTableRegistered(const void*);
#endif
- template<typename T, typename HeapTraits = HeapTypeTrait<T> > static Address allocate(size_t);
+ template<typename T, typename HeapTraits> static Address allocate(size_t);
+ // FIXME: remove this once c++11 is allowed everywhere:
+ template<typename T> static Address allocate(size_t);
+
template<typename T> static Address reallocate(void* previous, size_t);
static void collectGarbage(ThreadState::StackState);
@@ -1574,6 +1577,12 @@ Address Heap::allocate(size_t size)
}
template<typename T>
+Address Heap::allocate(size_t size)
+{
+ return allocate<T, HeapTypeTrait<T> >(size);
+}
+
+template<typename T>
Address Heap::reallocate(void* previous, size_t size)
{
if (!size) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698