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

Unified Diff: Source/core/rendering/RenderWidget.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/RenderWidget.h ('k') | Source/core/rendering/RenderWidgetProtector.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderWidget.cpp
diff --git a/Source/core/rendering/RenderWidget.cpp b/Source/core/rendering/RenderWidget.cpp
index 99e30dd37c834c003aca6907bc39d212679c6267..2c8d271b4e749219b30bb46dfab067198fdf675d 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;
@@ -111,12 +110,8 @@ void RenderWidget::willBeDestroyed()
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 +143,7 @@ bool RenderWidget::setWidgetGeometry(const LayoutRect& frame)
m_clipRect = clipRect;
- RenderWidgetProtector protector(this);
+ RefPtr<RenderWidget> protector(this);
RefPtr<Node> protectedNode(node());
m_widget->setFrameRect(newFrame);
@@ -318,10 +313,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()
« no previous file with comments | « Source/core/rendering/RenderWidget.h ('k') | Source/core/rendering/RenderWidgetProtector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698