| Index: components/plugins/renderer/webview_plugin.cc
|
| diff --git a/components/plugins/renderer/webview_plugin.cc b/components/plugins/renderer/webview_plugin.cc
|
| index af1d9199bf4b10412bdc5a4b011f463bfd0f6e60..506bc212263ea289dd7b08aa1724516c709e7596 100644
|
| --- a/components/plugins/renderer/webview_plugin.cc
|
| +++ b/components/plugins/renderer/webview_plugin.cc
|
| @@ -62,12 +62,13 @@
|
| // ApplyWebPreferences before making a WebLocalFrame so that the frame sees a
|
| // consistent view of our preferences.
|
| content::RenderView::ApplyWebPreferences(preferences, web_view_);
|
| - WebLocalFrame* web_frame = WebLocalFrame::create(
|
| + WebLocalFrame* web_local_frame = WebLocalFrame::create(
|
| blink::WebTreeScopeType::Document, &web_frame_client_);
|
| - web_view_->setMainFrame(web_frame);
|
| + web_frame_ = web_local_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.
|
| - WebFrameWidget::create(this, web_view_, web_frame);
|
| + web_frame_widget_ = WebFrameWidget::create(this, web_view_, web_local_frame);
|
| }
|
|
|
| // static
|
| @@ -84,7 +85,9 @@
|
|
|
| WebViewPlugin::~WebViewPlugin() {
|
| DCHECK(!weak_factory_.HasWeakPtrs());
|
| + web_frame_widget_->close();
|
| web_view_->close();
|
| + web_frame_->close();
|
| }
|
|
|
| WebPluginContainer* WebViewPlugin::container() const { return container_; }
|
|
|