fixup! Use strong ownership for attached inner WebContents

This commit is contained in:
deepak1556 2019-01-10 21:54:43 +05:30 committed by Jeremy Apthorp
parent 374406375b
commit 06a5ade3c6

View file

@ -38,11 +38,12 @@ void WebViewGuestDelegate::AttachToIframe(
DCHECK_EQ(embedder_web_contents_,
content::WebContents::FromRenderFrameHost(embedder_frame));
content::WebContents* guest_web_contents = api_web_contents_->web_contents();
// Attach this inner WebContents |guest_web_contents| to the outer
// WebContents |embedder_web_contents|. The outer WebContents's
// frame |embedder_frame| hosts the inner WebContents.
api_web_contents_->web_contents()->AttachToOuterWebContentsFrame(
base::WrapUnique<content::WebContents>(embedder_web_contents_),
guest_web_contents->AttachToOuterWebContentsFrame(
base::WrapUnique<content::WebContents>(guest_web_contents),
embedder_frame);
ResetZoomController();