From 32327b77a5a75d90ba14e40264da2aa512ea3a91 Mon Sep 17 00:00:00 2001 From: Samuel Attard Date: Mon, 31 Jul 2017 10:47:25 +1000 Subject: [PATCH] Remove unneeded check but document why it is not there now --- atom/browser/atom_browser_client.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/atom/browser/atom_browser_client.cc b/atom/browser/atom_browser_client.cc index c0b86b04cb2..2213908af20 100644 --- a/atom/browser/atom_browser_client.cc +++ b/atom/browser/atom_browser_client.cc @@ -120,9 +120,12 @@ bool AtomBrowserClient::ShouldCreateNewSiteInstance( // reuse the same site to allow cross-window scripting. We do // not need to check urls / domains as native window open logic // handles cross site scripting protection. - if (WebContentsPreferences::UsesNativeWindowOpen(web_contents)) { - return false; - } + // + // NOTE: We know that nativeWindowOpen is enabled at this point + // because we check if it is NOT enabled above this point. We + // will only reach this return if sanbox is disabled but + // nativeWindowOpen is enabled. + return false; } // Create new a SiteInstance if navigating to a different site.