Skip to content

Commit

Permalink
src: remove main_isolate
Browse files Browse the repository at this point in the history
PR-URL: #25823
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
  • Loading branch information
addaleax committed Feb 3, 2019
1 parent 270ffb0 commit 363ef3f
Showing 1 changed file with 0 additions and 17 deletions.
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 @@ -851,12 +846,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 @@ -877,12 +866,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

0 comments on commit 363ef3f

Please sign in to comment.