chore: warn when nodeIntegration's default is relied on (#16004)

This commit is contained in:
Jeremy Apthorp
2018-12-10 18:03:01 -08:00
committed by Cheng Zhao
parent e8d4a07137
commit 913a433576
4 changed files with 22 additions and 0 deletions

View File

@@ -98,6 +98,9 @@ WebContentsPreferences::WebContentsPreferences(
instances_.push_back(this);
preference_.SetKey(options::kNodeIntegrationWasExplicitlyEnabled,
base::Value(IsEnabled(options::kNodeIntegration)));
// Set WebPreferences defaults onto the JS object
SetDefaultBoolIfUndefined(options::kPlugins, false);
SetDefaultBoolIfUndefined(options::kExperimentalFeatures, false);