fix: don't run environment bootstrapper (#22342)
This commit is contained in:
parent
2aa734385e
commit
79270e30a6
14 changed files with 79 additions and 158 deletions
|
@ -349,8 +349,7 @@ void NodeBindings::Initialize() {
|
|||
|
||||
node::Environment* NodeBindings::CreateEnvironment(
|
||||
v8::Handle<v8::Context> context,
|
||||
node::MultiIsolatePlatform* platform,
|
||||
bool bootstrap_env) {
|
||||
node::MultiIsolatePlatform* platform) {
|
||||
#if defined(OS_WIN)
|
||||
auto& atom_args = ElectronCommandLine::argv();
|
||||
std::vector<std::string> args(atom_args.size());
|
||||
|
@ -389,9 +388,8 @@ node::Environment* NodeBindings::CreateEnvironment(
|
|||
std::unique_ptr<const char*[]> c_argv = StringVectorToArgArray(args);
|
||||
isolate_data_ =
|
||||
node::CreateIsolateData(context->GetIsolate(), uv_loop_, platform);
|
||||
node::Environment* env =
|
||||
node::CreateEnvironment(isolate_data_, context, args.size(), c_argv.get(),
|
||||
0, nullptr, bootstrap_env);
|
||||
node::Environment* env = node::CreateEnvironment(
|
||||
isolate_data_, context, args.size(), c_argv.get(), 0, nullptr);
|
||||
DCHECK(env);
|
||||
|
||||
// Clean up the global _noBrowserGlobals that we unironically injected into
|
||||
|
@ -399,7 +397,6 @@ node::Environment* NodeBindings::CreateEnvironment(
|
|||
if (browser_env_ != BrowserEnvironment::BROWSER) {
|
||||
// We need to bootstrap the env in non-browser processes so that
|
||||
// _noBrowserGlobals is read correctly before we remove it
|
||||
DCHECK(bootstrap_env);
|
||||
global.Delete("_noBrowserGlobals");
|
||||
}
|
||||
|
||||
|
|
|
@ -43,8 +43,7 @@ class NodeBindings {
|
|||
|
||||
// Create the environment and load node.js.
|
||||
node::Environment* CreateEnvironment(v8::Handle<v8::Context> context,
|
||||
node::MultiIsolatePlatform* platform,
|
||||
bool bootstrap_env);
|
||||
node::MultiIsolatePlatform* platform);
|
||||
|
||||
// Load node.js in the environment.
|
||||
void LoadEnvironment(node::Environment* env);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue