Index: Source/core/rendering/LayoutState.cpp |
diff --git a/Source/core/rendering/LayoutState.cpp b/Source/core/rendering/LayoutState.cpp |
index 8dd2d0c711cc18cd1ac0edd766b86759bc707a47..ad4daff8b8726b9603aa341c50cf255dbba4df99 100644 |
--- a/Source/core/rendering/LayoutState.cpp |
+++ b/Source/core/rendering/LayoutState.cpp |
@@ -26,8 +26,8 @@ |
#include "config.h" |
#include "core/rendering/LayoutState.h" |
+#include "core/platform/Partitions.h" |
#include "core/rendering/ColumnInfo.h" |
-#include "core/rendering/RenderArena.h" |
#include "core/rendering/RenderInline.h" |
#include "core/rendering/RenderLayer.h" |
#include "core/rendering/RenderView.h" |
@@ -161,32 +161,22 @@ LayoutState::LayoutState(RenderObject* root) |
} |
} |
-#ifndef NDEBUG |
-static bool inLayoutStateDestroy; |
-#endif |
- |
-void LayoutState::destroy(RenderArena* renderArena) |
+void LayoutState::destroy() |
{ |
-#ifndef NDEBUG |
- inLayoutStateDestroy = true; |
-#endif |
delete this; |
-#ifndef NDEBUG |
- inLayoutStateDestroy = false; |
-#endif |
- renderArena->free(*(size_t*)this, this); |
} |
-void* LayoutState::operator new(size_t sz, RenderArena* renderArena) |
+#if ENABLE(PARTITION_ALLOC) |
+void* LayoutState::operator new(size_t sz) |
{ |
- return renderArena->allocate(sz); |
+ return partitionAlloc(Partitions::getRenderingPartition(), sz); |
} |
-void LayoutState::operator delete(void* ptr, size_t sz) |
+void LayoutState::operator delete(void* ptr) |
{ |
- ASSERT(inLayoutStateDestroy); |
- *(size_t*)ptr = sz; |
+ partitionFree(ptr); |
} |
+#endif |
void LayoutState::clearPaginationInformation() |
{ |