diff --git a/core/libdeno/binding.cc b/core/libdeno/binding.cc index 911c614994..830edcf5ab 100644 --- a/core/libdeno/binding.cc +++ b/core/libdeno/binding.cc @@ -175,7 +175,7 @@ v8::Local ImportBuf(DenoIsolate* d, deno_buf buf) { if (buf.data_len > GLOBAL_IMPORT_BUF_SIZE) { // Simple case. We allocate a new ArrayBuffer for this. ab = v8::ArrayBuffer::New(d->isolate_, buf.data_len); - data = ab->GetContents().Data(); + data = ab->GetBackingStore()->Data(); } else { // Fast case. We reuse the global ArrayBuffer. if (d->global_import_buf_.IsEmpty()) { @@ -183,7 +183,7 @@ v8::Local ImportBuf(DenoIsolate* d, deno_buf buf) { DCHECK_NULL(d->global_import_buf_ptr_); ab = v8::ArrayBuffer::New(d->isolate_, GLOBAL_IMPORT_BUF_SIZE); d->global_import_buf_.Reset(d->isolate_, ab); - d->global_import_buf_ptr_ = ab->GetContents().Data(); + d->global_import_buf_ptr_ = ab->GetBackingStore()->Data(); } else { DCHECK(d->global_import_buf_ptr_); ab = d->global_import_buf_.Get(d->isolate_); @@ -233,7 +233,7 @@ void Send(const v8::FunctionCallbackInfo& args) { if (args[1]->IsArrayBufferView()) { auto view = v8::Local::Cast(args[1]); auto data = - reinterpret_cast(view->Buffer()->GetContents().Data()); + reinterpret_cast(view->Buffer()->GetBackingStore()->Data()); control = {data + view->ByteOffset(), view->ByteLength()}; } diff --git a/core/libdeno/buffer.h b/core/libdeno/buffer.h index 9a6e3acf7d..a0e75f7be0 100644 --- a/core/libdeno/buffer.h +++ b/core/libdeno/buffer.h @@ -103,7 +103,7 @@ class PinnedBuf { PinnedBuf() : data_ptr_(nullptr), data_len_(0), pin_() {} explicit PinnedBuf(v8::Local view) { - auto buf = view->Buffer()->GetContents().Data(); + auto buf = view->Buffer()->GetBackingStore()->Data(); ArrayBufferAllocator::global().Ref(buf); data_ptr_ = reinterpret_cast(buf) + view->ByteOffset();