Add better comments to ShouldCreateNewSiteInstance

This commit is contained in:
Ryohei Ikegami 2017-04-05 18:16:10 +09:00
parent cbdd52e43b
commit b683584859

View file

@ -105,8 +105,10 @@ bool AtomBrowserClient::ShouldCreateNewSiteInstance(
auto web_contents = auto web_contents =
content::WebContents::FromRenderFrameHost(render_frame_host); content::WebContents::FromRenderFrameHost(render_frame_host);
if (root_web_contents_.find(web_contents) != root_web_contents_.end()) { if (root_web_contents_.find(web_contents) != root_web_contents_.end()) {
// non-sandboxed renderers with native.window.open always create a new // Root WebContents should always create new process
// SiteInstance in the root webcontents. // to make sure native addons are loaded correctly after reload / navigation.
// (Non-root WebContents opened by window.open() should try to reuse process
// to allow synchronous cross-window scripting.)
return true; return true;
} }
} }