Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/node_snapshotable.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,20 +48,20 @@ struct InternalFieldInfo {

static InternalFieldInfo* New(EmbedderObjectType type, size_t length) {
InternalFieldInfo* result =
reinterpret_cast<InternalFieldInfo*>(::operator new(length));
reinterpret_cast<InternalFieldInfo*>(::operator new[](length));
result->type = type;
result->length = length;
return result;
}

InternalFieldInfo* Copy() const {
InternalFieldInfo* result =
reinterpret_cast<InternalFieldInfo*>(::operator new(length));
reinterpret_cast<InternalFieldInfo*>(::operator new[](length));
memcpy(result, this, length);
return result;
}

void Delete() { ::operator delete(this); }
void Delete() { ::operator delete[](this); }
};

// An interface for snapshotable native objects to inherit from.
Expand Down