From c2a6145240f89e75912de436a61736d8817974b5 Mon Sep 17 00:00:00 2001 From: Chengzhong Wu Date: Mon, 23 Nov 2026 10:39:13 -0500 Subject: [PATCH] src: migrate stream_base off ArrayBufferView::Buffer() V8 16.0 removes ArrayBufferView::Buffer(). Use GetBuffer() instead, which is already available in V8 15.8. Refs: https://github.com/nodejs/node/pull/67407 Refs: https://crrev.com/c/8794471 Signed-off-by: Chengzhong Wu --- src/stream_base.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/stream_base.cc b/src/stream_base.cc index fb16da9b5a9f..e5ce7a587cbf 100644 --- a/src/stream_base.cc +++ b/src/stream_base.cc @@ -805,7 +805,7 @@ void CustomBufferJSListener::SetBuffer(Local object, Local view) { // Keep the view's lifetime tied to the wrapper without a strong global root. object->SetInternalField(StreamBase::kUserBufferField, view); - backing_store_ = view->Buffer()->GetBackingStore(); + backing_store_ = view->GetBuffer()->GetBackingStore(); } uv_buf_t CustomBufferJSListener::OnStreamAlloc(size_t suggested_size) { @@ -826,7 +826,7 @@ uv_buf_t CustomBufferJSListener::OnStreamAlloc(size_t suggested_size) { const auto contents = view->GetContents({}); // An attached empty backing store can also have a null data pointer. if (contents.data() != nullptr || (backing_store_->MaxByteLength() == 0 && - !view->Buffer()->WasDetached())) { + !view->GetBuffer()->WasDetached())) { buffer_ = uv_buf_init(reinterpret_cast(contents.data()), contents.size()); return buffer_;