Skip to content

Commit 363ef3f

Browse files
committed
src: remove main_isolate
PR-URL: #25823 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
1 parent 270ffb0 commit 363ef3f

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

src/node.cc

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -134,11 +134,6 @@ using v8::V8;
134134
using v8::Value;
135135

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

143138
// node_revert.h
144139
// Bit flag used to track security reverts.
@@ -851,12 +846,6 @@ inline int Start(uv_loop_t* event_loop,
851846
UNREACHABLE();
852847
}
853848

854-
{
855-
Mutex::ScopedLock scoped_lock(per_process::main_isolate_mutex);
856-
CHECK_NULL(per_process::main_isolate);
857-
per_process::main_isolate = isolate;
858-
}
859-
860849
int exit_code;
861850
{
862851
Locker locker(isolate);
@@ -877,12 +866,6 @@ inline int Start(uv_loop_t* event_loop,
877866
Start(isolate, isolate_data.get(), args, exec_args);
878867
}
879868

880-
{
881-
Mutex::ScopedLock scoped_lock(per_process::main_isolate_mutex);
882-
CHECK_EQ(per_process::main_isolate, isolate);
883-
per_process::main_isolate = nullptr;
884-
}
885-
886869
isolate->Dispose();
887870
per_process::v8_platform.Platform()->UnregisterIsolate(isolate);
888871

0 commit comments

Comments
 (0)