summaryrefslogtreecommitdiff
path: root/src/node_platform.cc
diff options
context:
space:
mode:
authorAndreas Haas <ahaas@google.com>2018-06-03 17:35:25 +0200
committerMichaƫl Zasso <targos@protonmail.com>2018-09-07 21:07:25 +0200
commitd5e72944457117913c7ded2caf1f623a25f8726f (patch)
tree0d5faacfef5023353b901f93da05c282d116efaf /src/node_platform.cc
parent3771c9abc852d73748dde22866e71cd552ec8214 (diff)
downloadnode-new-d5e72944457117913c7ded2caf1f623a25f8726f.tar.gz
src: initialize PerIsolateData eagerly
PR-URL: https://github.com/nodejs/node/pull/21983 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Diffstat (limited to 'src/node_platform.cc')
-rw-r--r--src/node_platform.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/node_platform.cc b/src/node_platform.cc
index 92e9b371c5..1c237159f2 100644
--- a/src/node_platform.cc
+++ b/src/node_platform.cc
@@ -259,8 +259,7 @@ NodePlatform::NodePlatform(int thread_pool_size,
std::make_shared<WorkerThreadsTaskRunner>(thread_pool_size);
}
-void NodePlatform::RegisterIsolate(IsolateData* isolate_data, uv_loop_t* loop) {
- Isolate* isolate = isolate_data->isolate();
+void NodePlatform::RegisterIsolate(Isolate* isolate, uv_loop_t* loop) {
Mutex::ScopedLock lock(per_isolate_mutex_);
std::shared_ptr<PerIsolatePlatformData> existing = per_isolate_[isolate];
if (existing) {
@@ -272,8 +271,7 @@ void NodePlatform::RegisterIsolate(IsolateData* isolate_data, uv_loop_t* loop) {
}
}
-void NodePlatform::UnregisterIsolate(IsolateData* isolate_data) {
- Isolate* isolate = isolate_data->isolate();
+void NodePlatform::UnregisterIsolate(Isolate* isolate) {
Mutex::ScopedLock lock(per_isolate_mutex_);
std::shared_ptr<PerIsolatePlatformData> existing = per_isolate_[isolate];
CHECK(existing);