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

Unified Diff: webkit/api/src/WebPluginContainerImpl.cpp

Issue 182003: Fix a crash that the reliability bots caught.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 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 | « no previous file | webkit/data/layout_tests/chrome/plugins/get-url-with-iframe-target-no-crash.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/api/src/WebPluginContainerImpl.cpp
===================================================================
--- webkit/api/src/WebPluginContainerImpl.cpp (revision 24689)
+++ webkit/api/src/WebPluginContainerImpl.cpp (working copy)
@@ -255,8 +255,10 @@
// FIXME: This is a bit of hack to allow us to observe completion of
// our frame request. It would be better to evolve FrameLoader to
// support a completion callback instead.
- WebDataSourceImpl::setNextPluginLoadObserver(
- new WebPluginLoadObserver(this, request.url(), notifyData));
+ WebPluginLoadObserver* observer =
+ new WebPluginLoadObserver(this, request.url(), notifyData);
+ m_pluginLoadObservers.append(observer);
+ WebDataSourceImpl::setNextPluginLoadObserver(observer);
}
FrameLoadRequest frameRequest(request.toResourceRequest());
@@ -312,6 +314,8 @@
WebPluginContainerImpl::~WebPluginContainerImpl()
{
+ for (size_t i = 0; i < m_pluginLoadObservers.size(); ++i)
+ m_pluginLoadObservers[i]->clearPluginContainer();
m_webPlugin->destroy();
}
« no previous file with comments | « no previous file | webkit/data/layout_tests/chrome/plugins/get-url-with-iframe-target-no-crash.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698