src: remove obsolete NoArrayBufferZeroFillScope

No longer used or necessary

PR-URL: https://github.com/nodejs/node/pull/56913
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Xuguang Mei <meixuguang@gmail.com>
This commit is contained in:
James M Snell authored and Michaël Zasso committed 2025-02-07 13:12:46 +01:00
1 parent 1913a4aabc
commit 086cdc297a
2 files changed
-23

No files matched your search

-10
View File
@@ -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_;
}
-13
View File
@@ -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;