Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/stream_base.cc
Original file line number Diff line number Diff line change
Expand Up @@ -805,7 +805,7 @@ void CustomBufferJSListener::SetBuffer(Local<Object> object,
Local<ArrayBufferView> 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) {
Expand All @@ -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<char*>(contents.data()),
contents.size());
return buffer_;
Expand Down
Loading