Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnna Henningsen <anna@addaleax.net>2019-11-08 21:40:46 +0300
committerDaniel Bevenius <daniel.bevenius@gmail.com>2019-11-12 08:29:23 +0300
commite66a2acc4cb9fc09fc32d1833b89ae56468a0931 (patch)
tree2db9ffe469a2c662eda46cef848a17d39b8a3787 /src/aliased_buffer.h
parentf8c069f5b88a25304ee2fc638c51464b4df196dd (diff)
src: migrate off ArrayBuffer::GetContents
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 <me@gus.host> Reviewed-By: Michaƫl Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com>
Diffstat (limited to 'src/aliased_buffer.h')
-rw-r--r--src/aliased_buffer.h4
1 files changed, 2 insertions, 2 deletions
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<v8::ArrayBuffer> ab = v8::ArrayBuffer::New(
isolate_, size_in_bytes);
- buffer_ = static_cast<NativeT*>(ab->GetContents().Data());
+ buffer_ = static_cast<NativeT*>(ab->GetBackingStore()->Data());
// allocate v8 TypedArray
v8::Local<V8T> 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<NativeT*>(ab->GetContents().Data());
+ NativeT* new_buffer = static_cast<NativeT*>(ab->GetBackingStore()->Data());
// copy old content
memcpy(new_buffer, buffer_, old_size_in_bytes);