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

Unified Diff: Source/core/rendering/LayoutState.cpp

Issue 20231002: Replace RenderArena with PartitionAlloc (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase. Created 7 years, 5 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 | « Source/core/rendering/LayoutState.h ('k') | Source/core/rendering/RenderArena.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/LayoutState.cpp
diff --git a/Source/core/rendering/LayoutState.cpp b/Source/core/rendering/LayoutState.cpp
index fe30cdaae1f613c2ec7426947aae142903b78bc6..6d1b6fa3f19761d2c1d5e27ddd03343ae15aefa0 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,31 +161,14 @@ LayoutState::LayoutState(RenderObject* root)
}
}
-#ifndef NDEBUG
-static bool inLayoutStateDestroy;
-#endif
-
-void LayoutState::destroy(RenderArena* renderArena)
-{
-#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)
+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);
}
void LayoutState::clearPaginationInformation()
« no previous file with comments | « Source/core/rendering/LayoutState.h ('k') | Source/core/rendering/RenderArena.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698