Skip to content

Commit 086cdc2

Browse files
jasnelltargos
authored andcommitted
src: remove obsolete NoArrayBufferZeroFillScope
No longer used or necessary PR-URL: #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>
1 parent 1913a4a commit 086cdc2

File tree

2 files changed

+0
-23
lines changed

2 files changed

+0
-23
lines changed

src/env-inl.h

-10
Original file line numberDiff line numberDiff line change
@@ -44,16 +44,6 @@
4444

4545
namespace node {
4646

47-
NoArrayBufferZeroFillScope::NoArrayBufferZeroFillScope(
48-
IsolateData* isolate_data)
49-
: node_allocator_(isolate_data->node_allocator()) {
50-
if (node_allocator_ != nullptr) node_allocator_->zero_fill_field()[0] = 0;
51-
}
52-
53-
NoArrayBufferZeroFillScope::~NoArrayBufferZeroFillScope() {
54-
if (node_allocator_ != nullptr) node_allocator_->zero_fill_field()[0] = 1;
55-
}
56-
5747
inline v8::Isolate* IsolateData::isolate() const {
5848
return isolate_;
5949
}

src/env.h

-13
Original file line numberDiff line numberDiff line change
@@ -112,19 +112,6 @@ class ModuleWrap;
112112
class Environment;
113113
class Realm;
114114

115-
// Disables zero-filling for ArrayBuffer allocations in this scope. This is
116-
// similar to how we implement Buffer.allocUnsafe() in JS land.
117-
class NoArrayBufferZeroFillScope {
118-
public:
119-
inline explicit NoArrayBufferZeroFillScope(IsolateData* isolate_data);
120-
inline ~NoArrayBufferZeroFillScope();
121-
122-
private:
123-
NodeArrayBufferAllocator* node_allocator_;
124-
125-
friend class Environment;
126-
};
127-
128115
struct IsolateDataSerializeInfo {
129116
std::vector<SnapshotIndex> primitive_values;
130117
std::vector<PropInfo> template_values;

0 commit comments

Comments
 (0)