Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
devsnek committed Jun 23, 2022
1 parent 49c3b76 commit d7ead7a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/node_wasi.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1641,18 +1641,18 @@ void WASI::SockShutdown(const FunctionCallbackInfo<Value>& args) {

void WASI::_SetMemory(const FunctionCallbackInfo<Value>& args) {
WASI* wasi;
ASSIGN_OR_RETURN_UNWRAP(&wasi, args.This());
CHECK_EQ(args.Length(), 1);
if (!args[0]->IsWasmMemoryObject()) {
return node::THROW_ERR_INVALID_ARG_TYPE(
env, "instance.exports.memory must be a WebAssembly.Memory object");
wasi->env(),
"instance.exports.memory must be a WebAssembly.Memory object");
}
ASSIGN_OR_RETURN_UNWRAP(&wasi, args.This());
wasi->memory_.Reset(wasi->env()->isolate(), args[0].As<WasmMemoryObject>());
}


uvwasi_errno_t WASI::backingStore(char** store, size_t* byte_length) {
Environment* env = this->env();
Local<WasmMemoryObject> memory = PersistentToLocal::Strong(this->memory_);
std::shared_ptr<BackingStore> backing_store =
memory->Buffer()->GetBackingStore();
Expand Down

0 comments on commit d7ead7a

Please sign in to comment.