feat: upgrade to Node 12 (#17838)

* fix: add boringssl backport to support node upgrade

* fix: Update node_includes.h, add DCHECK macros

* fix: Update node Debug Options parser usage

* fix: Fix asar setup

* fix: using v8Util in isolated context

* fix: make "process" available in preload scripts

* fix: use proper options parser and remove setting of _breakFirstLine

_breakFirstLine was being set on the process, but that has changed in node 12 and so is no longer needed. Node will handle it properly when --inspect-brk is provided

* chore: update node dep sha

* fix: process.binding => _linkedBinding in sandboxed isolated preload

* fix: make original-fs work with streams

* build: override node module version

* fix: use _linkedBinding in content_script/init.js

* chore: update node ref in DEPS

* build: node_module_version should be 73
This commit is contained in:
Cheng Zhao 2019-04-26 18:55:12 +09:00 committed by GitHub
parent e1acfffaf8
commit a4fcc32799
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 249 additions and 32 deletions

View file

@ -37,13 +37,13 @@ void NodeDebugger::Start() {
}
node::DebugOptions options;
node::options_parser::DebugOptionsParser options_parser;
std::vector<std::string> exec_args;
std::vector<std::string> v8_args;
std::vector<std::string> errors;
node::options_parser::DebugOptionsParser::instance.Parse(
&args, &exec_args, &v8_args, &options,
node::options_parser::kDisallowedInEnvironment, &errors);
options_parser.Parse(&args, &exec_args, &v8_args, &options,
node::options_parser::kDisallowedInEnvironment, &errors);
if (!errors.empty()) {
// TODO(jeremy): what's the appropriate behaviour here?
@ -51,13 +51,6 @@ void NodeDebugger::Start() {
<< base::JoinString(errors, " ");
}
// Set process._debugWaitConnect if --inspect-brk was specified to stop
// the debugger on the first line
if (options.wait_for_connect()) {
mate::Dictionary process(env_->isolate(), env_->process_object());
process.Set("_breakFirstLine", true);
}
const char* path = "";
if (inspector->Start(path, options,
std::make_shared<node::HostPort>(options.host_port),