feat: warn when remote is used without enableRemoteModule: true (#21546)
* feat: warn when remote is used without enableRemoteModule: true * fix security warning
This commit is contained in:
parent
2f394d46c7
commit
2e1531ad90
4 changed files with 14 additions and 7 deletions
|
@ -174,10 +174,6 @@ WebContentsPreferences::~WebContentsPreferences() {
|
|||
}
|
||||
|
||||
void WebContentsPreferences::SetDefaults() {
|
||||
#if BUILDFLAG(ENABLE_REMOTE_MODULE)
|
||||
SetDefaultBoolIfUndefined(options::kEnableRemoteModule, true);
|
||||
#endif
|
||||
|
||||
if (IsEnabled(options::kSandbox)) {
|
||||
SetBool(options::kNativeWindowOpen, true);
|
||||
}
|
||||
|
@ -331,7 +327,7 @@ void WebContentsPreferences::AppendCommandLineSwitches(
|
|||
|
||||
#if BUILDFLAG(ENABLE_REMOTE_MODULE)
|
||||
// Whether to enable the remote module
|
||||
if (IsEnabled(options::kEnableRemoteModule))
|
||||
if (IsEnabled(options::kEnableRemoteModule, true))
|
||||
command_line->AppendSwitch(switches::kEnableRemoteModule);
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue