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

PR-URL: #56913
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Chengzhong Wu <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Xuguang Mei <[email protected]>
  • Loading branch information
jasnell authored and targos committed Feb 7, 2025
1 parent 1913a4a commit 086cdc2
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 086cdc2

Please sign in to comment.