Commit 3aa76a7a authored by mostynb@opera.com's avatar mostynb@opera.com

remove template c++11'ism in Heap.h

Followup to CL 486193002 to remove default arguments from template types,
which is only allowed in c++11 and later (and we haven't officially switched
to c++11 yet afaik).

Review URL: https://codereview.chromium.org/559733004

git-svn-id: svn://svn.chromium.org/blink/trunk@181719 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent acab5085
...@@ -1103,7 +1103,10 @@ public: ...@@ -1103,7 +1103,10 @@ public:
static bool weakTableRegistered(const void*); static bool weakTableRegistered(const void*);
#endif #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); template<typename T> static Address reallocate(void* previous, size_t);
static void collectGarbage(ThreadState::StackState); static void collectGarbage(ThreadState::StackState);
...@@ -1573,6 +1576,12 @@ Address Heap::allocate(size_t size) ...@@ -1573,6 +1576,12 @@ Address Heap::allocate(size_t size)
return static_cast<typename HeapTraits::HeapType*>(heap)->allocate(size, gcInfo); return static_cast<typename HeapTraits::HeapType*>(heap)->allocate(size, gcInfo);
} }
template<typename T>
Address Heap::allocate(size_t size)
{
return allocate<T, HeapTypeTrait<T> >(size);
}
template<typename T> template<typename T>
Address Heap::reallocate(void* previous, size_t size) Address Heap::reallocate(void* previous, size_t size)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment