From e378b681d01b976ce96d9264481795748e9a6158 Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Tue, 30 Jun 2020 19:53:48 +0200 Subject: [PATCH] src: remove unused fields from IsolateData PR-URL: https://github.com/nodejs/node/pull/34139 Reviewed-By: Shelley Vohr Reviewed-By: David Carlier Reviewed-By: Gireesh Punathil Reviewed-By: Zeyu Yang Reviewed-By: Gus Caplan Reviewed-By: James M Snell --- src/env-inl.h | 8 -------- src/env.cc | 7 ------- src/env.h | 4 ---- 3 files changed, 19 deletions(-) diff --git a/src/env-inl.h b/src/env-inl.h index 5126b18e83daa5..d2f52ec1437a9d 100644 --- a/src/env-inl.h +++ b/src/env-inl.h @@ -49,14 +49,6 @@ inline uv_loop_t* IsolateData::event_loop() const { return event_loop_; } -inline bool IsolateData::uses_node_allocator() const { - return uses_node_allocator_; -} - -inline v8::ArrayBuffer::Allocator* IsolateData::allocator() const { - return allocator_; -} - inline NodeArrayBufferAllocator* IsolateData::node_allocator() const { return node_allocator_; } diff --git a/src/env.cc b/src/env.cc index 991ba3cf98d4a2..bfcee5a6a0f827 100644 --- a/src/env.cc +++ b/src/env.cc @@ -189,13 +189,9 @@ IsolateData::IsolateData(Isolate* isolate, const std::vector* indexes) : isolate_(isolate), event_loop_(event_loop), - allocator_(isolate->GetArrayBufferAllocator()), node_allocator_(node_allocator == nullptr ? nullptr : node_allocator->GetImpl()), - uses_node_allocator_(allocator_ == node_allocator_), platform_(platform) { - CHECK_NOT_NULL(allocator_); - options_.reset( new PerIsolateOptions(*(per_process::cli_options->per_isolate))); @@ -222,9 +218,6 @@ void IsolateData::MemoryInfo(MemoryTracker* tracker) const { if (node_allocator_ != nullptr) { tracker->TrackFieldWithSize( "node_allocator", sizeof(*node_allocator_), "NodeArrayBufferAllocator"); - } else { - tracker->TrackFieldWithSize( - "allocator", sizeof(*allocator_), "v8::ArrayBuffer::Allocator"); } tracker->TrackFieldWithSize( "platform", sizeof(*platform_), "MultiIsolatePlatform"); diff --git a/src/env.h b/src/env.h index 5c91f90e6f0356..1a06e1d31e5030 100644 --- a/src/env.h +++ b/src/env.h @@ -505,8 +505,6 @@ class IsolateData : public MemoryRetainer { inline std::shared_ptr options(); inline void set_options(std::shared_ptr options); - inline bool uses_node_allocator() const; - inline v8::ArrayBuffer::Allocator* allocator() const; inline NodeArrayBufferAllocator* node_allocator() const; inline worker::Worker* worker_context() const; @@ -556,9 +554,7 @@ class IsolateData : public MemoryRetainer { v8::Isolate* const isolate_; uv_loop_t* const event_loop_; - v8::ArrayBuffer::Allocator* const allocator_; NodeArrayBufferAllocator* const node_allocator_; - const bool uses_node_allocator_; MultiIsolatePlatform* platform_; std::shared_ptr options_; worker::Worker* worker_context_ = nullptr;