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

Unified Diff: Source/web/WebFrameWidgetImpl.cpp

Issue 1294293004: Oilpan: Move WebFrameWidgetImpl into Oilpan heap. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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/web/WebFrameWidgetImpl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebFrameWidgetImpl.cpp
diff --git a/Source/web/WebFrameWidgetImpl.cpp b/Source/web/WebFrameWidgetImpl.cpp
index 4872a33bdb0111a27fb7df683f6c00cec9642add..0959b5eea4039aa0c8df9e1d28b89f7de87ff5ab 100644
--- a/Source/web/WebFrameWidgetImpl.cpp
+++ b/Source/web/WebFrameWidgetImpl.cpp
@@ -73,7 +73,11 @@ WebFrameWidget* WebFrameWidget::create(WebView* webView)
WebFrameWidgetImpl* WebFrameWidgetImpl::create(WebWidgetClient* client, WebLocalFrame* localRoot)
{
// Pass the WebFrameWidgetImpl's self-reference to the caller.
+#if ENABLE(OILPAN)
+ return new WebFrameWidgetImpl(client, localRoot); // SelfKeepAlive is set in constructor.
+#else
return adoptRef(new WebFrameWidgetImpl(client, localRoot)).leakRef();
+#endif
}
// static
@@ -93,6 +97,9 @@ WebFrameWidgetImpl::WebFrameWidgetImpl(WebWidgetClient* client, WebLocalFrame* l
, m_layerTreeViewClosed(false)
, m_suppressNextKeypressEvent(false)
, m_ignoreInputEvents(false)
+#if ENABLE(OILPAN)
+ , m_selfKeepAlive(this)
+#endif
{
ASSERT(m_localRoot->frame()->isLocalRoot());
initializeLayerTreeView();
@@ -104,6 +111,12 @@ WebFrameWidgetImpl::~WebFrameWidgetImpl()
{
}
+DEFINE_TRACE(WebFrameWidgetImpl)
+{
+ visitor->trace(m_localRoot);
+ visitor->trace(m_mouseCaptureNode);
+}
+
// WebWidget ------------------------------------------------------------------
void WebFrameWidgetImpl::close()
@@ -118,7 +131,11 @@ void WebFrameWidgetImpl::close()
// deleted.
m_client = nullptr;
haraken 2015/08/18 08:03:08 Can we clear m_layerTreeView, m_rootLayer, m_rootG
Yuta Kitamura 2015/08/18 08:33:59 Done.
+#if ENABLE(OILPAN)
+ m_selfKeepAlive.clear();
+#else
deref(); // Balances ref() acquired in WebFrameWidget::create
+#endif
}
WebSize WebFrameWidgetImpl::size()
« no previous file with comments | « Source/web/WebFrameWidgetImpl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698