Skip to content

Commit ee3243f

Browse files
addaleaxjasnell
authored andcommitted
src: remove unused fields from IsolateData
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>
1 parent db3b209 commit ee3243f

File tree

3 files changed

+0
-19
lines changed

3 files changed

+0
-19
lines changed

src/env-inl.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,6 @@ inline uv_loop_t* IsolateData::event_loop() const {
4949
return event_loop_;
5050
}
5151

52-
inline bool IsolateData::uses_node_allocator() const {
53-
return uses_node_allocator_;
54-
}
55-
56-
inline v8::ArrayBuffer::Allocator* IsolateData::allocator() const {
57-
return allocator_;
58-
}
59-
6052
inline NodeArrayBufferAllocator* IsolateData::node_allocator() const {
6153
return node_allocator_;
6254
}

src/env.cc

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -189,13 +189,9 @@ IsolateData::IsolateData(Isolate* isolate,
189189
const std::vector<size_t>* indexes)
190190
: isolate_(isolate),
191191
event_loop_(event_loop),
192-
allocator_(isolate->GetArrayBufferAllocator()),
193192
node_allocator_(node_allocator == nullptr ? nullptr
194193
: node_allocator->GetImpl()),
195-
uses_node_allocator_(allocator_ == node_allocator_),
196194
platform_(platform) {
197-
CHECK_NOT_NULL(allocator_);
198-
199195
options_.reset(
200196
new PerIsolateOptions(*(per_process::cli_options->per_isolate)));
201197

@@ -222,9 +218,6 @@ void IsolateData::MemoryInfo(MemoryTracker* tracker) const {
222218
if (node_allocator_ != nullptr) {
223219
tracker->TrackFieldWithSize(
224220
"node_allocator", sizeof(*node_allocator_), "NodeArrayBufferAllocator");
225-
} else {
226-
tracker->TrackFieldWithSize(
227-
"allocator", sizeof(*allocator_), "v8::ArrayBuffer::Allocator");
228221
}
229222
tracker->TrackFieldWithSize(
230223
"platform", sizeof(*platform_), "MultiIsolatePlatform");

src/env.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -548,8 +548,6 @@ class IsolateData : public MemoryRetainer {
548548
inline std::shared_ptr<PerIsolateOptions> options();
549549
inline void set_options(std::shared_ptr<PerIsolateOptions> options);
550550

551-
inline bool uses_node_allocator() const;
552-
inline v8::ArrayBuffer::Allocator* allocator() const;
553551
inline NodeArrayBufferAllocator* node_allocator() const;
554552

555553
inline worker::Worker* worker_context() const;
@@ -599,9 +597,7 @@ class IsolateData : public MemoryRetainer {
599597

600598
v8::Isolate* const isolate_;
601599
uv_loop_t* const event_loop_;
602-
v8::ArrayBuffer::Allocator* const allocator_;
603600
NodeArrayBufferAllocator* const node_allocator_;
604-
const bool uses_node_allocator_;
605601
MultiIsolatePlatform* platform_;
606602
std::shared_ptr<PerIsolateOptions> options_;
607603
worker::Worker* worker_context_ = nullptr;

0 commit comments

Comments
 (0)