From d0989802bd460a6a3d0a067222bfdd684dbffc62 Mon Sep 17 00:00:00 2001 From: John Kleinschmidt Date: Tue, 16 Mar 2021 15:39:40 -0400 Subject: [PATCH] 2720306: [api] Remove deprecated [Shared]ArrayBuffer API https://chromium-review.googlesource.com/c/v8/v8/+/2720306 --- shell/common/v8_value_converter.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/shell/common/v8_value_converter.cc b/shell/common/v8_value_converter.cc index 46674718f799..9bc691f0a1f7 100644 --- a/shell/common/v8_value_converter.cc +++ b/shell/common/v8_value_converter.cc @@ -257,7 +257,9 @@ v8::Local V8ValueConverter::ToArrayBuffer( } auto context = isolate->GetCurrentContext(); auto array_buffer = v8::ArrayBuffer::New(isolate, length); - memcpy(array_buffer->GetContents().Data(), data, length); + std::shared_ptr backing_store = + array_buffer->GetBackingStore(); + memcpy(backing_store->Data(), data, length); // From this point, if something goes wrong(can't find Buffer class for // example) we'll simply return a Uint8Array based on the created ArrayBuffer. // This can happen if no preload script was specified to the renderer.