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

Unified Diff: components/plugins/renderer/webview_plugin.cc

Issue 2369613003: Require WebLocalFrame to be created with a non-null client (Closed)
Patch Set: oops Created 4 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
Index: components/plugins/renderer/webview_plugin.cc
diff --git a/components/plugins/renderer/webview_plugin.cc b/components/plugins/renderer/webview_plugin.cc
index 506bc212263ea289dd7b08aa1724516c709e7596..af1d9199bf4b10412bdc5a4b011f463bfd0f6e60 100644
--- a/components/plugins/renderer/webview_plugin.cc
+++ b/components/plugins/renderer/webview_plugin.cc
@@ -62,13 +62,12 @@ WebViewPlugin::WebViewPlugin(content::RenderView* render_view,
// ApplyWebPreferences before making a WebLocalFrame so that the frame sees a
// consistent view of our preferences.
content::RenderView::ApplyWebPreferences(preferences, web_view_);
- WebLocalFrame* web_local_frame = WebLocalFrame::create(
+ WebLocalFrame* web_frame = WebLocalFrame::create(
blink::WebTreeScopeType::Document, &web_frame_client_);
- web_frame_ = web_local_frame;
- web_view_->setMainFrame(web_frame_);
+ web_view_->setMainFrame(web_frame);
// TODO(dcheng): The main frame widget currently has a special case.
// Eliminate this once WebView is no longer a WebWidget.
- web_frame_widget_ = WebFrameWidget::create(this, web_view_, web_local_frame);
+ WebFrameWidget::create(this, web_view_, web_frame);
}
// static
@@ -85,9 +84,7 @@ WebViewPlugin* WebViewPlugin::Create(content::RenderView* render_view,
WebViewPlugin::~WebViewPlugin() {
DCHECK(!weak_factory_.HasWeakPtrs());
- web_frame_widget_->close();
web_view_->close();
- web_frame_->close();
}
WebPluginContainer* WebViewPlugin::container() const { return container_; }

Powered by Google App Engine
This is Rietveld 408576698