Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

src: remove main_isolate #25823

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 0 additions & 17 deletions src/node.cc
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,6 @@ using v8::V8;
using v8::Value;

namespace per_process {
// TODO(joyeecheung): these are no longer necessary. Remove them.
// See: https://github.com/nodejs/node/pull/25302#discussion_r244924196
// Isolate on the main thread
static Mutex main_isolate_mutex;
static Isolate* main_isolate;

// node_revert.h
// Bit flag used to track security reverts.
Expand Down Expand Up @@ -855,12 +850,6 @@ inline int Start(uv_loop_t* event_loop,
UNREACHABLE();
}

{
Mutex::ScopedLock scoped_lock(per_process::main_isolate_mutex);
CHECK_NULL(per_process::main_isolate);
per_process::main_isolate = isolate;
}

int exit_code;
{
Locker locker(isolate);
Expand All @@ -881,12 +870,6 @@ inline int Start(uv_loop_t* event_loop,
Start(isolate, isolate_data.get(), args, exec_args);
}

{
Mutex::ScopedLock scoped_lock(per_process::main_isolate_mutex);
CHECK_EQ(per_process::main_isolate, isolate);
per_process::main_isolate = nullptr;
}

isolate->Dispose();
per_process::v8_platform.Platform()->UnregisterIsolate(isolate);

Expand Down