Skip to content

Commit

Permalink
src: remove unused fields from IsolateData
Browse files Browse the repository at this point in the history
PR-URL: #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>
  • Loading branch information
addaleax authored and MylesBorins committed Jul 16, 2020
1 parent e386188 commit e378b68
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 19 deletions.
8 changes: 0 additions & 8 deletions src/env-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -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_;
}
Expand Down
7 changes: 0 additions & 7 deletions src/env.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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)));

Expand All @@ -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");
Expand Down
4 changes: 0 additions & 4 deletions src/env.h
Original file line number Diff line number Diff line change
Expand Up @@ -505,8 +505,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;
Expand Down Expand Up @@ -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<PerIsolateOptions> options_;
worker::Worker* worker_context_ = nullptr;
Expand Down

0 comments on commit e378b68

Please sign in to comment.