Skip to content

Commit

Permalink
[rab/gsab] Fix missing assignment in BackingStore::Reallocate
Browse files Browse the repository at this point in the history
See nodejs/node#39945

Bug: v8:11111
Change-Id: I7271a907bf036c18a014b2a13ff5746db622456a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3141581
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76670}
  • Loading branch information
marjakh authored and V8 LUCI CQ committed Sep 6, 2021
1 parent 062b86e commit 5681a65
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/objects/backing-store.cc
Expand Up @@ -796,7 +796,7 @@ std::unique_ptr<BackingStore> BackingStore::EmptyBackingStore(

bool BackingStore::Reallocate(Isolate* isolate, size_t new_byte_length) {
CHECK(!is_wasm_memory_ && !custom_deleter_ && !globally_registered_ &&
free_on_destruct_);
free_on_destruct_ && !is_resizable_);
auto allocator = get_v8_api_array_buffer_allocator();
CHECK_EQ(isolate->array_buffer_allocator(), allocator);
CHECK_EQ(byte_length_, byte_capacity_);
Expand All @@ -806,6 +806,7 @@ bool BackingStore::Reallocate(Isolate* isolate, size_t new_byte_length) {
buffer_start_ = new_start;
byte_capacity_ = new_byte_length;
byte_length_ = new_byte_length;
max_byte_length_ = new_byte_length;
return true;
}

Expand Down

0 comments on commit 5681a65

Please sign in to comment.