From b683584859c95c8f34208bd4b11886563ecff639 Mon Sep 17 00:00:00 2001 From: Ryohei Ikegami Date: Wed, 5 Apr 2017 18:16:10 +0900 Subject: [PATCH] Add better comments to ShouldCreateNewSiteInstance --- atom/browser/atom_browser_client.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/atom/browser/atom_browser_client.cc b/atom/browser/atom_browser_client.cc index 14d71b5517..3a9bef9f87 100644 --- a/atom/browser/atom_browser_client.cc +++ b/atom/browser/atom_browser_client.cc @@ -105,8 +105,10 @@ bool AtomBrowserClient::ShouldCreateNewSiteInstance( auto web_contents = content::WebContents::FromRenderFrameHost(render_frame_host); if (root_web_contents_.find(web_contents) != root_web_contents_.end()) { - // non-sandboxed renderers with native.window.open always create a new - // SiteInstance in the root webcontents. + // Root WebContents should always create new process + // 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; } }