Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e3fcdef

Browse filesBrowse files
psmarshalladdaleax
authored andcommitted
v8: backport pieces from 18a26cfe174 from upstream v8
Backport new virtual methods from 18a26cfe174 ("Add memory protection API to ArrayBuffer::Allocator") PR-URL: #13217 Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 9c7af15 commit e3fcdef
Copy full SHA for e3fcdef

File tree

Expand file treeCollapse file tree

2 files changed

+20
-0
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

2 files changed

+20
-0
lines changed
Open diff view settings
Collapse file

‎deps/v8/include/v8.h‎

Copy file name to clipboardExpand all lines: deps/v8/include/v8.h
+8Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4176,12 +4176,20 @@ class V8_EXPORT ArrayBuffer : public Object {
41764176
*/
41774177
virtual void* AllocateUninitialized(size_t length) = 0;
41784178

4179+
virtual void* Reserve(size_t length);
4180+
41794181
/**
41804182
* Free the memory block of size |length|, pointed to by |data|.
41814183
* That memory is guaranteed to be previously allocated by |Allocate|.
41824184
*/
41834185
virtual void Free(void* data, size_t length) = 0;
41844186

4187+
enum class AllocationMode { kNormal, kReservation };
4188+
virtual void Free(void* data, size_t length, AllocationMode mode);
4189+
enum class Protection { kNoAccess, kReadWrite };
4190+
virtual void SetProtection(void* data, size_t length,
4191+
Protection protection);
4192+
41854193
/**
41864194
* malloc/free based convenience allocator.
41874195
*
Collapse file

‎deps/v8/src/api.cc‎

Copy file name to clipboardExpand all lines: deps/v8/src/api.cc
+12Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -437,6 +437,18 @@ void V8::SetSnapshotDataBlob(StartupData* snapshot_blob) {
437437
i::V8::SetSnapshotBlob(snapshot_blob);
438438
}
439439

440+
void* v8::ArrayBuffer::Allocator::Reserve(size_t length) { UNIMPLEMENTED(); }
441+
442+
void v8::ArrayBuffer::Allocator::Free(void* data, size_t length,
443+
AllocationMode mode) {
444+
UNIMPLEMENTED();
445+
}
446+
447+
void v8::ArrayBuffer::Allocator::SetProtection(
448+
void* data, size_t length,
449+
v8::ArrayBuffer::Allocator::Protection protection) {
450+
UNIMPLEMENTED();
451+
}
440452

441453
namespace {
442454

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.