From 931b1d4e68ccc6fc2a9a0199a3c98947f9fe7f38 Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Wed, 30 Jan 2019 19:45:31 +0100 Subject: [PATCH] src: remove main_isolate --- src/node.cc | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/src/node.cc b/src/node.cc index 8593daeefcfd35..98fb90d1a925c2 100644 --- a/src/node.cc +++ b/src/node.cc @@ -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. @@ -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); @@ -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);