Remove unneeded check but document why it is not there now

This commit is contained in:
Samuel Attard 2017-07-31 10:47:25 +10:00
parent 3ac2f674bc
commit 32327b77a5

View file

@ -120,10 +120,13 @@ bool AtomBrowserClient::ShouldCreateNewSiteInstance(
// reuse the same site to allow cross-window scripting. We do // reuse the same site to allow cross-window scripting. We do
// not need to check urls / domains as native window open logic // not need to check urls / domains as native window open logic
// handles cross site scripting protection. // handles cross site scripting protection.
if (WebContentsPreferences::UsesNativeWindowOpen(web_contents)) { //
// 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; return false;
} }
}
// Create new a SiteInstance if navigating to a different site. // Create new a SiteInstance if navigating to a different site.
auto src_url = current_instance->GetSiteURL(); auto src_url = current_instance->GetSiteURL();