src: remove unused fields from IsolateData

PR-URL: https://github.com/nodejs/node/pull/34139
Reviewed-By: Shelley Vohr <codebytere@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Zeyu Yang <himself65@outlook.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
Anna Henningsen
2020-06-30 19:53:48 +02:00
committed by James M Snell
parent db3b209e7d
commit ee3243fe3f
3 changed files with 0 additions and 19 deletions

View File

@@ -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_;
}

View File

@@ -189,13 +189,9 @@ IsolateData::IsolateData(Isolate* isolate,
const std::vector<size_t>* 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");

View File

@@ -548,8 +548,6 @@ class IsolateData : public MemoryRetainer {
inline std::shared_ptr<PerIsolateOptions> options();
inline void set_options(std::shared_ptr<PerIsolateOptions> options);
inline bool uses_node_allocator() const;
inline v8::ArrayBuffer::Allocator* allocator() const;
inline NodeArrayBufferAllocator* node_allocator() const;
inline worker::Worker* worker_context() const;
@@ -599,9 +597,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<PerIsolateOptions> options_;
worker::Worker* worker_context_ = nullptr;