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

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

Issue 16896019: Replace RenderArena with PartitionAlloc. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 6 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
Index: Source/core/rendering/RenderWidget.cpp
diff --git a/Source/core/rendering/RenderWidget.cpp b/Source/core/rendering/RenderWidget.cpp
index 2d76543b739a523c3c0cdd9ba7949c036df664f9..97276523c27cd8b117603c190e67f02fc98a7d4d 100644
--- a/Source/core/rendering/RenderWidget.cpp
+++ b/Source/core/rendering/RenderWidget.cpp
@@ -31,7 +31,6 @@
#include "core/rendering/RenderLayer.h"
#include "core/rendering/RenderLayerBacking.h"
#include "core/rendering/RenderView.h"
-#include "core/rendering/RenderWidgetProtector.h"
using namespace std;
@@ -112,11 +111,9 @@ void RenderWidget::destroy()
{
willBeDestroyed();
- // Grab the arena from node()->document()->renderArena() before clearing the node pointer.
// Clear the node before deref-ing, as this may be deleted when deref is called.
- RenderArena* arena = renderArena();
clearNode();
- deref(arena);
+ deref();
}
RenderWidget::~RenderWidget()
@@ -148,7 +145,6 @@ bool RenderWidget::setWidgetGeometry(const LayoutRect& frame)
m_clipRect = clipRect;
- RenderWidgetProtector protector(this);
RefPtr<Node> protectedNode(node());
m_widget->setFrameRect(newFrame);
@@ -318,10 +314,10 @@ void RenderWidget::setOverlapTestResult(bool isOverlapped)
toFrameView(m_widget.get())->setIsOverlapped(isOverlapped);
}
-void RenderWidget::deref(RenderArena *arena)
+void RenderWidget::deref()
{
if (--m_refCount <= 0)
- arenaDelete(arena, this);
+ postDestroy();
}
void RenderWidget::updateWidgetPosition()

Powered by Google App Engine
This is Rietveld 408576698