diff --git a/libcef/browser/extensions/browser_extensions_util.cc b/libcef/browser/extensions/browser_extensions_util.cc index e4f9a0bd6..c7ea3e1a3 100644 --- a/libcef/browser/extensions/browser_extensions_util.cc +++ b/libcef/browser/extensions/browser_extensions_util.cc @@ -58,8 +58,10 @@ content::WebContents* GetOwnerForGuestContents(content::WebContents* guest) { static_cast(guest); content::BrowserPluginGuest* plugin_guest = guest_impl->GetBrowserPluginGuest(); - if (plugin_guest) - return plugin_guest->embedder_web_contents(); + if (plugin_guest) { + return content::WebContents::FromRenderFrameHost( + plugin_guest->GetEmbedderFrame()); + } // Maybe it's a print preview dialog. auto print_preview_controller =