diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2012-10-15 16:08:57 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2012-10-15 16:08:57 +0200 |
commit | 5466563f4b5b6b86523e3f89bb7f77e5b5270c78 (patch) | |
tree | 8caccf7cd03a15207cde3ba282c88bf132482a91 /Source/JavaScriptCore/heap/HeapBlock.h | |
parent | 33b26980cb24288b5a9f2590ccf32a949281bb79 (diff) | |
download | qtwebkit-5466563f4b5b6b86523e3f89bb7f77e5b5270c78.tar.gz |
Imported WebKit commit 0dc6cd75e1d4836eaffbb520be96fac4847cc9d2 (http://svn.webkit.org/repository/webkit/trunk@131300)
WebKit update which introduces the QtWebKitWidgets module that contains the WK1
widgets based API. (In fact it renames QtWebKit to QtWebKitWidgets while we're
working on completing the entire split as part of
https://bugs.webkit.org/show_bug.cgi?id=99314
Diffstat (limited to 'Source/JavaScriptCore/heap/HeapBlock.h')
-rw-r--r-- | Source/JavaScriptCore/heap/HeapBlock.h | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/Source/JavaScriptCore/heap/HeapBlock.h b/Source/JavaScriptCore/heap/HeapBlock.h index a63b7ebe1..f67ef9129 100644 --- a/Source/JavaScriptCore/heap/HeapBlock.h +++ b/Source/JavaScriptCore/heap/HeapBlock.h @@ -27,13 +27,14 @@ #define HeapBlock_h #include <wtf/DoublyLinkedList.h> -#include <wtf/PageAllocationAligned.h> #include <wtf/StdLibExtras.h> namespace JSC { enum AllocationEffort { AllocationCanFail, AllocationMustSucceed }; +class Region; + #if COMPILER(GCC) #define CLASS_IF_GCC class #else @@ -46,28 +47,25 @@ class HeapBlock : public DoublyLinkedListNode<T> { public: static const size_t s_blockSize = 64 * KB; - static PageAllocationAligned destroy(HeapBlock* block) + static HeapBlock* destroy(HeapBlock* block) { static_cast<T*>(block)->~T(); - - PageAllocationAligned allocation; - std::swap(allocation, block->m_allocation); - return allocation; + return block; } - HeapBlock(const PageAllocationAligned& allocation) + HeapBlock(Region* region) : DoublyLinkedListNode<T>() - , m_allocation(allocation) + , m_region(region) , m_prev(0) , m_next(0) { - ASSERT(m_allocation); + ASSERT(m_region); } - const PageAllocationAligned allocation() const { return m_allocation; } + Region* region() const { return m_region; } private: - PageAllocationAligned m_allocation; + Region* m_region; T* m_prev; T* m_next; }; |