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

Unified Diff: third_party/WebKit/Source/web/WebPluginLoadObserver.cpp

Issue 1442643003: Oilpan: move WebPluginLoadObserver to the heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: provide clearPluginContainer() w/ non-Oilpan only Created 5 years, 1 month 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 | « third_party/WebKit/Source/web/WebPluginLoadObserver.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/web/WebPluginLoadObserver.cpp
diff --git a/third_party/WebKit/Source/web/WebPluginLoadObserver.cpp b/third_party/WebKit/Source/web/WebPluginLoadObserver.cpp
index 8e1adfcd798cb70c9f5b29e67bb92c14c3baf065..911a75192d0dac75e2d99b039771dbabfa22bec2 100644
--- a/third_party/WebKit/Source/web/WebPluginLoadObserver.cpp
+++ b/third_party/WebKit/Source/web/WebPluginLoadObserver.cpp
@@ -38,20 +38,31 @@ namespace blink {
WebPluginLoadObserver::~WebPluginLoadObserver()
{
+#if !ENABLE(OILPAN)
if (m_pluginContainer)
m_pluginContainer->willDestroyPluginLoadObserver(this);
+#endif
+}
+
+DEFINE_TRACE(WebPluginLoadObserver)
+{
+ visitor->trace(m_pluginContainer);
}
void WebPluginLoadObserver::didFinishLoading()
{
- if (m_pluginContainer)
- m_pluginContainer->plugin()->didFinishLoadingFrameRequest(m_notifyURL, m_notifyData);
+ if (!m_pluginContainer)
+ return;
+ if (WebPlugin* plugin = m_pluginContainer->plugin())
+ plugin->didFinishLoadingFrameRequest(m_notifyURL, m_notifyData);
}
void WebPluginLoadObserver::didFailLoading(const WebURLError& error)
{
- if (m_pluginContainer)
- m_pluginContainer->plugin()->didFailLoadingFrameRequest(m_notifyURL, m_notifyData, error);
+ if (!m_pluginContainer)
+ return;
+ if (WebPlugin* plugin = m_pluginContainer->plugin())
+ plugin->didFailLoadingFrameRequest(m_notifyURL, m_notifyData, error);
}
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/web/WebPluginLoadObserver.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698