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

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

Issue 459353002: Oilpan: Move more code of RenderObject destructors to destroy(). (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 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/RenderBlock.h ('k') | Source/core/rendering/RenderBoxModelObject.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderBlock.cpp
diff --git a/Source/core/rendering/RenderBlock.cpp b/Source/core/rendering/RenderBlock.cpp
index 7a4db09eda33c4fdc5d87bc6e6582270b9c086ae..fb4dd16de83b758328d9a3be7075a17a4c9e7fa3 100644
--- a/Source/core/rendering/RenderBlock.cpp
+++ b/Source/core/rendering/RenderBlock.cpp
@@ -216,7 +216,7 @@ static void appendImagesFromStyle(Vector<ImageResource*>& images, RenderStyle& b
appendImageIfNotNull(images, blockStyle.shapeOutside()->image());
}
-RenderBlock::~RenderBlock()
+void RenderBlock::removeFromGlobalMaps()
{
if (hasColumns())
gColumnInfoMap->take(this);
@@ -226,6 +226,22 @@ RenderBlock::~RenderBlock()
removeBlockFromDescendantAndContainerMaps(this, gPositionedDescendantsMap, gPositionedContainerMap);
}
+RenderBlock::~RenderBlock()
+{
+#if !ENABLE(OILPAN)
+ removeFromGlobalMaps();
haraken 2014/08/12 08:08:15 Can't we call removeFromGlobalMaps() in destroy()
tkent 2014/08/12 08:37:51 We can't. |this| is deleted in destroy().
+#endif
+}
+
+void RenderBlock::destroy()
+{
+ RenderBox::destroy();
haraken 2014/08/12 08:08:15 Nit: Make the destroy call to the parent class a t
tkent 2014/08/12 08:37:51 We can't do it. destroy() depends on the global m
haraken 2014/08/12 08:47:00 I understand what's going on. Then it seems to me
+#if ENABLE(OILPAN)
+ // RenderObject::removeChild called in destory() depends on gColumnInfoMap.
+ removeFromGlobalMaps();
+#endif
+}
+
void RenderBlock::willBeDestroyed()
{
// Mark as being destroyed to avoid trouble with merges in removeChild().
« no previous file with comments | « Source/core/rendering/RenderBlock.h ('k') | Source/core/rendering/RenderBoxModelObject.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698