Skip to content

Commit fd6ce53

Browse files
addaleaxtargos
authored andcommitted
src: remove main_isolate
PR-URL: #25823 Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]>
1 parent c8bf432 commit fd6ce53

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

src/node.cc

-17
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.
@@ -855,12 +850,6 @@ inline int Start(uv_loop_t* event_loop,
855850
UNREACHABLE();
856851
}
857852

858-
{
859-
Mutex::ScopedLock scoped_lock(per_process::main_isolate_mutex);
860-
CHECK_NULL(per_process::main_isolate);
861-
per_process::main_isolate = isolate;
862-
}
863-
864853
int exit_code;
865854
{
866855
Locker locker(isolate);
@@ -881,12 +870,6 @@ inline int Start(uv_loop_t* event_loop,
881870
Start(isolate, isolate_data.get(), args, exec_args);
882871
}
883872

884-
{
885-
Mutex::ScopedLock scoped_lock(per_process::main_isolate_mutex);
886-
CHECK_EQ(per_process::main_isolate, isolate);
887-
per_process::main_isolate = nullptr;
888-
}
889-
890873
isolate->Dispose();
891874
per_process::v8_platform.Platform()->UnregisterIsolate(isolate);
892875

0 commit comments

Comments
 (0)