From 2733a561e47241fd8596f4cd37dc93149c56806a Mon Sep 17 00:00:00 2001 From: Marshall Greenblatt Date: Thu, 26 Oct 2017 14:15:05 -0400 Subject: [PATCH] Disable browser-side navigation by default (issue #2290) --- libcef/common/main_delegate.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libcef/common/main_delegate.cc b/libcef/common/main_delegate.cc index 22c0ee527..ed2ad57dc 100644 --- a/libcef/common/main_delegate.cc +++ b/libcef/common/main_delegate.cc @@ -435,6 +435,13 @@ bool CefMainDelegate::BasicStartupComplete(int* exit_code) { switches::kUncaughtExceptionStackSize, base::IntToString(settings.uncaught_exception_stack_size)); } + + // If browser-side navigation is not explicitly enabled or disabled, disable + // it. See https://crbug.com/776884. + if (!command_line->HasSwitch(switches::kDisableBrowserSideNavigation) && + !command_line->HasSwitch(switches::kEnableBrowserSideNavigation)) { + command_line->AppendSwitch(switches::kDisableBrowserSideNavigation); + } } if (content_client_.application().get()) {