Skip to content

Commit

Permalink
src: remove obsolete NoArrayBufferZeroFillScope
Browse files Browse the repository at this point in the history
No longer used or necessary
  • Loading branch information
jasnell committed Feb 4, 2025
1 parent dd92abc commit dfb451a
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 23 deletions.
10 changes: 0 additions & 10 deletions src/env-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,6 @@

namespace node {

NoArrayBufferZeroFillScope::NoArrayBufferZeroFillScope(
IsolateData* isolate_data)
: node_allocator_(isolate_data->node_allocator()) {
if (node_allocator_ != nullptr) node_allocator_->zero_fill_field()[0] = 0;
}

NoArrayBufferZeroFillScope::~NoArrayBufferZeroFillScope() {
if (node_allocator_ != nullptr) node_allocator_->zero_fill_field()[0] = 1;
}

inline v8::Isolate* IsolateData::isolate() const {
return isolate_;
}
Expand Down
13 changes: 0 additions & 13 deletions src/env.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,19 +112,6 @@ class ModuleWrap;
class Environment;
class Realm;

// Disables zero-filling for ArrayBuffer allocations in this scope. This is
// similar to how we implement Buffer.allocUnsafe() in JS land.
class NoArrayBufferZeroFillScope {
public:
inline explicit NoArrayBufferZeroFillScope(IsolateData* isolate_data);
inline ~NoArrayBufferZeroFillScope();

private:
NodeArrayBufferAllocator* node_allocator_;

friend class Environment;
};

struct IsolateDataSerializeInfo {
std::vector<SnapshotIndex> primitive_values;
std::vector<PropInfo> template_values;
Expand Down

0 comments on commit dfb451a

Please sign in to comment.