@@ -175,15 +175,15 @@ v8::Local<v8::Uint8Array> ImportBuf(DenoIsolate* d, deno_buf buf) {
175
175
if (buf.data_len > GLOBAL_IMPORT_BUF_SIZE) {
176
176
// Simple case. We allocate a new ArrayBuffer for this.
177
177
ab = v8::ArrayBuffer::New (d->isolate_ , buf.data_len );
178
- data = ab->GetContents (). Data ();
178
+ data = ab->GetBackingStore ()-> Data ();
179
179
} else {
180
180
// Fast case. We reuse the global ArrayBuffer.
181
181
if (d->global_import_buf_ .IsEmpty ()) {
182
182
// Lazily initialize it.
183
183
DCHECK_NULL (d->global_import_buf_ptr_ );
184
184
ab = v8::ArrayBuffer::New (d->isolate_ , GLOBAL_IMPORT_BUF_SIZE);
185
185
d->global_import_buf_ .Reset (d->isolate_ , ab);
186
- d->global_import_buf_ptr_ = ab->GetContents (). Data ();
186
+ d->global_import_buf_ptr_ = ab->GetBackingStore ()-> Data ();
187
187
} else {
188
188
DCHECK (d->global_import_buf_ptr_ );
189
189
ab = d->global_import_buf_ .Get (d->isolate_ );
@@ -233,7 +233,7 @@ void Send(const v8::FunctionCallbackInfo<v8::Value>& args) {
233
233
if (args[1 ]->IsArrayBufferView ()) {
234
234
auto view = v8::Local<v8::ArrayBufferView>::Cast (args[1 ]);
235
235
auto data =
236
- reinterpret_cast <uint8_t *>(view->Buffer ()->GetContents (). Data ());
236
+ reinterpret_cast <uint8_t *>(view->Buffer ()->GetBackingStore ()-> Data ());
237
237
control = {data + view->ByteOffset (), view->ByteLength ()};
238
238
}
239
239
0 commit comments