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

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

Issue 869323003: Oilpan: move RenderObjects off heap. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: review-induced improvements Created 5 years, 10 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/RenderPart.h ('k') | Source/core/rendering/RenderQuote.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderPart.cpp
diff --git a/Source/core/rendering/RenderPart.cpp b/Source/core/rendering/RenderPart.cpp
index 33f88c93b1e1551309a59f26fe37c25b975defc4..035a68f6872fea7cd5e60563e45fe40b7892bf78 100644
--- a/Source/core/rendering/RenderPart.cpp
+++ b/Source/core/rendering/RenderPart.cpp
@@ -41,24 +41,20 @@ namespace blink {
RenderPart::RenderPart(Element* element)
: RenderReplaced(element)
-#if !ENABLE(OILPAN)
// Reference counting is used to prevent the part from being destroyed
// while inside the Widget code, which might not be able to handle that.
, m_refCount(1)
-#endif
{
ASSERT(element);
frameView()->addPart(this);
setInline(false);
}
-#if !ENABLE(OILPAN)
void RenderPart::deref()
{
if (--m_refCount <= 0)
postDestroy();
}
-#endif
void RenderPart::willBeDestroyed()
{
@@ -78,26 +74,14 @@ void RenderPart::willBeDestroyed()
void RenderPart::destroy()
{
-#if ENABLE(ASSERT) && ENABLE(OILPAN)
- ASSERT(!m_didCallDestroy);
- m_didCallDestroy = true;
-#endif
willBeDestroyed();
clearNode();
-#if ENABLE(OILPAN)
- // In Oilpan, postDestroy doesn't delete |this|. So calling it here is safe
- // though |this| will be referred in FrameView.
- postDestroy();
-#else
deref();
-#endif
}
RenderPart::~RenderPart()
{
-#if !ENABLE(OILPAN)
ASSERT(m_refCount <= 0);
-#endif
}
Widget* RenderPart::widget() const
« no previous file with comments | « Source/core/rendering/RenderPart.h ('k') | Source/core/rendering/RenderQuote.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698