diff --git a/src/node_wasi.cc b/src/node_wasi.cc index 965a619c8d4acd..b377228126543f 100644 --- a/src/node_wasi.cc +++ b/src/node_wasi.cc @@ -73,7 +73,6 @@ inline void Debug(WASI* wasi, Args&&... args) { } while (0) using v8::Array; -using v8::BackingStore; using v8::BigInt; using v8::Context; using v8::Exception; @@ -1654,10 +1653,9 @@ void WASI::_SetMemory(const FunctionCallbackInfo& args) { uvwasi_errno_t WASI::backingStore(char** store, size_t* byte_length) { Local memory = PersistentToLocal::Strong(this->memory_); - std::shared_ptr backing_store = - memory->Buffer()->GetBackingStore(); - *byte_length = backing_store->ByteLength(); - *store = static_cast(backing_store->Data()); + Local ab = memory->Buffer(); + *byte_length = ab->ByteLength(); + *store = static_cast(ab->Data()); CHECK_NOT_NULL(*store); return UVWASI_ESUCCESS; } diff --git a/src/node_wasm_web_api.cc b/src/node_wasm_web_api.cc index 67437034bbee34..6fe5a51b4c4202 100644 --- a/src/node_wasm_web_api.cc +++ b/src/node_wasm_web_api.cc @@ -105,12 +105,12 @@ void WasmStreamingObject::Push(const FunctionCallbackInfo& args) { if (LIKELY(chunk->IsArrayBufferView())) { Local view = chunk.As(); - bytes = view->Buffer()->GetBackingStore()->Data(); + bytes = view->Buffer()->Data(); offset = view->ByteOffset(); size = view->ByteLength(); } else if (LIKELY(chunk->IsArrayBuffer())) { Local buffer = chunk.As(); - bytes = buffer->GetBackingStore()->Data(); + bytes = buffer->Data(); offset = 0; size = buffer->ByteLength(); } else {