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

Unified Diff: content/renderer/browser_plugin/browser_plugin.cc

Issue 574623004: GuestViewContainer lifetime should only be managed by BrowserPlugin and not RenderFrameObserver (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed unnecessary change Created 6 years, 3 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 | extensions/renderer/guest_view/guest_view_container.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/browser_plugin/browser_plugin.cc
diff --git a/content/renderer/browser_plugin/browser_plugin.cc b/content/renderer/browser_plugin/browser_plugin.cc
index c0a2e8a96c5be93804bfffb2fcaf05474c9bf8fe..1be227deac4342edf795619bd3b5ecf4db3043b1 100644
--- a/content/renderer/browser_plugin/browser_plugin.cc
+++ b/content/renderer/browser_plugin/browser_plugin.cc
@@ -435,12 +435,13 @@ void BrowserPlugin::destroy() {
// If the plugin was initialized then it has a valid |npp_| identifier, and
// the |container_| must clear references to the plugin's script objects.
DCHECK(!npp_ || container_);
- if (container_)
+ if (container_) {
container_->clearScriptObjects();
- // The BrowserPlugin's WebPluginContainer is deleted immediately after this
- // call returns, so let's not keep a reference to it around.
- g_plugin_container_map.Get().erase(container_);
+ // The BrowserPlugin's WebPluginContainer is deleted immediately after this
+ // call returns, so let's not keep a reference to it around.
+ g_plugin_container_map.Get().erase(container_);
+ }
if (compositing_helper_.get())
compositing_helper_->OnContainerDestroy();
« no previous file with comments | « no previous file | extensions/renderer/guest_view/guest_view_container.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698