From e66a2acc4cb9fc09fc32d1833b89ae56468a0931 Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Fri, 8 Nov 2019 20:40:46 +0200 Subject: src: migrate off ArrayBuffer::GetContents MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit V8 deprecates `GetContents()` in favour of `GetBackingStore()`. Update our code to reflect that. V8 also deprecates `Externalize()` and `IsExternal()`; we should be able to remove all usage of this once V8 8.0 is there. PR-URL: https://github.com/nodejs/node/pull/30339 Refs: https://github.com/v8/v8/commit/bfe3d6bce734e596e312465e207bcfd55a59fe34 Reviewed-By: Gus Caplan Reviewed-By: Michaƫl Zasso Reviewed-By: Colin Ihrig Reviewed-By: Jiawen Geng Reviewed-By: David Carlier --- src/aliased_buffer.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/aliased_buffer.h') diff --git a/src/aliased_buffer.h b/src/aliased_buffer.h index 5083ae9a1f4..b083fb68e69 100644 --- a/src/aliased_buffer.h +++ b/src/aliased_buffer.h @@ -42,7 +42,7 @@ class AliasedBufferBase { // allocate v8 ArrayBuffer v8::Local ab = v8::ArrayBuffer::New( isolate_, size_in_bytes); - buffer_ = static_cast(ab->GetContents().Data()); + buffer_ = static_cast(ab->GetBackingStore()->Data()); // allocate v8 TypedArray v8::Local js_array = V8T::New(ab, byte_offset_, count); @@ -228,7 +228,7 @@ class AliasedBufferBase { isolate_, new_size_in_bytes); // allocate new native buffer - NativeT* new_buffer = static_cast(ab->GetContents().Data()); + NativeT* new_buffer = static_cast(ab->GetBackingStore()->Data()); // copy old content memcpy(new_buffer, buffer_, old_size_in_bytes); -- cgit v1.2.3