diff options
author | Anna Henningsen <anna@addaleax.net> | 2019-11-08 21:40:46 +0300 |
---|---|---|
committer | Daniel Bevenius <daniel.bevenius@gmail.com> | 2019-11-12 08:29:23 +0300 |
commit | e66a2acc4cb9fc09fc32d1833b89ae56468a0931 (patch) | |
tree | 2db9ffe469a2c662eda46cef848a17d39b8a3787 /src/util-inl.h | |
parent | f8c069f5b88a25304ee2fc638c51464b4df196dd (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/util-inl.h')
-rw-r--r-- | src/util-inl.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/util-inl.h b/src/util-inl.h index c06a0ae84c8..d44ee09fefb 100644 --- a/src/util-inl.h +++ b/src/util-inl.h @@ -514,7 +514,7 @@ void ArrayBufferViewContents<T, S>::Read(v8::Local<v8::ArrayBufferView> abv) { static_assert(sizeof(T) == 1, "Only supports one-byte data at the moment"); length_ = abv->ByteLength(); if (length_ > sizeof(stack_storage_) || abv->HasBuffer()) { - data_ = static_cast<T*>(abv->Buffer()->GetContents().Data()) + + data_ = static_cast<T*>(abv->Buffer()->GetBackingStore()->Data()) + abv->ByteOffset(); } else { abv->CopyContents(stack_storage_, sizeof(stack_storage_)); |