summaryrefslogtreecommitdiff
path: root/test/addons/openssl-binding
diff options
context:
space:
mode:
authorAnna Henningsen <anna@addaleax.net>2019-11-08 20:40:46 +0200
committerDaniel Bevenius <daniel.bevenius@gmail.com>2019-11-12 06:29:23 +0100
commite66a2acc4cb9fc09fc32d1833b89ae56468a0931 (patch)
tree2db9ffe469a2c662eda46cef848a17d39b8a3787 /test/addons/openssl-binding
parentf8c069f5b88a25304ee2fc638c51464b4df196dd (diff)
downloadandroid-node-v8-e66a2acc4cb9fc09fc32d1833b89ae56468a0931.tar.gz
android-node-v8-e66a2acc4cb9fc09fc32d1833b89ae56468a0931.tar.bz2
android-node-v8-e66a2acc4cb9fc09fc32d1833b89ae56468a0931.zip
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 'test/addons/openssl-binding')
-rw-r--r--test/addons/openssl-binding/binding.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/addons/openssl-binding/binding.cc b/test/addons/openssl-binding/binding.cc
index ecda40f4cb..6cfecc4505 100644
--- a/test/addons/openssl-binding/binding.cc
+++ b/test/addons/openssl-binding/binding.cc
@@ -12,8 +12,8 @@ inline void RandomBytes(const v8::FunctionCallbackInfo<v8::Value>& info) {
auto byte_length = view->ByteLength();
assert(view->HasBuffer());
auto buffer = view->Buffer();
- auto contents = buffer->GetContents();
- auto data = static_cast<unsigned char*>(contents.Data()) + byte_offset;
+ auto contents = buffer->GetBackingStore();
+ auto data = static_cast<unsigned char*>(contents->Data()) + byte_offset;
assert(RAND_poll());
auto rval = RAND_bytes(data, static_cast<int>(byte_length));
info.GetReturnValue().Set(rval > 0);