Merge pull request #4955 from atom/remove-node-integration-disable-path
Remove path for nodeIntegration value of 'disable'
This commit is contained in:
commit
7353fb4296
2 changed files with 1 additions and 6 deletions
|
@ -97,11 +97,6 @@ void WebContentsPreferences::AppendExtraCommandLineSwitches(
|
|||
// Check if we have node integration specified.
|
||||
bool node_integration = true;
|
||||
web_preferences.GetBoolean(options::kNodeIntegration, &node_integration);
|
||||
// Be compatible with old API of "node-integration" option.
|
||||
std::string old_token;
|
||||
if (web_preferences.GetString(options::kNodeIntegration, &old_token) &&
|
||||
old_token != "disable")
|
||||
node_integration = true;
|
||||
command_line->AppendSwitchASCII(switches::kNodeIntegration,
|
||||
node_integration ? "true" : "false");
|
||||
|
||||
|
|
|
@ -84,7 +84,7 @@ if (window.location.protocol === 'chrome-devtools:') {
|
|||
}
|
||||
}
|
||||
|
||||
if (nodeIntegration === 'true' || nodeIntegration === 'all' || nodeIntegration === 'except-iframe' || nodeIntegration === 'manual-enable-iframe') {
|
||||
if (nodeIntegration === 'true') {
|
||||
// Export node bindings to global.
|
||||
global.require = require
|
||||
global.module = module
|
||||
|
|
Loading…
Reference in a new issue