Commit c9756be9 authored by Eric Holk's avatar Eric Holk Committed by Commit Bot

Use old ArrayBuffer free by default

If the new Free function is not implemented, but we are freeing a Normal
allocation, as opposed to one with guard regions, we can fall back on the
existing Free function.

Because guard regions are not yet used in normal circumstances, this will let
embedders who have not implemented the improve ArrayBuffer::Allocator interface
to continue working.

Bug: 
Change-Id: I2e30b523ef7493ab288110b90d8f994bfcfbc9b7
Reviewed-on: https://chromium-review.googlesource.com/508897
Commit-Queue: Eric Holk <eholk@chromium.org>
Commit-Queue: Brad Nelson <bradnelson@chromium.org>
Reviewed-by: 's avatarBrad Nelson <bradnelson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45408}
parent 18a26cfe
......@@ -445,7 +445,16 @@ void* v8::ArrayBuffer::Allocator::Reserve(size_t length) { UNIMPLEMENTED(); }
void v8::ArrayBuffer::Allocator::Free(void* data, size_t length,
AllocationMode mode) {
UNIMPLEMENTED();
switch (mode) {
case AllocationMode::kNormal: {
Free(data, length);
return;
}
case AllocationMode::kReservation: {
UNIMPLEMENTED();
return;
}
}
}
void v8::ArrayBuffer::Allocator::SetProtection(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment