File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -1641,18 +1641,18 @@ void WASI::SockShutdown(const FunctionCallbackInfo<Value>& args) {
1641
1641
1642
1642
void WASI::_SetMemory (const FunctionCallbackInfo<Value>& args) {
1643
1643
WASI* wasi;
1644
+ ASSIGN_OR_RETURN_UNWRAP (&wasi, args.This ());
1644
1645
CHECK_EQ (args.Length (), 1 );
1645
1646
if (!args[0 ]->IsWasmMemoryObject ()) {
1646
1647
return node::THROW_ERR_INVALID_ARG_TYPE (
1647
- env, " instance.exports.memory must be a WebAssembly.Memory object" );
1648
+ wasi->env (),
1649
+ " instance.exports.memory must be a WebAssembly.Memory object" );
1648
1650
}
1649
- ASSIGN_OR_RETURN_UNWRAP (&wasi, args.This ());
1650
1651
wasi->memory_ .Reset (wasi->env ()->isolate (), args[0 ].As <WasmMemoryObject>());
1651
1652
}
1652
1653
1653
1654
1654
1655
uvwasi_errno_t WASI::backingStore (char ** store, size_t * byte_length) {
1655
- Environment* env = this ->env ();
1656
1656
Local<WasmMemoryObject> memory = PersistentToLocal::Strong (this ->memory_ );
1657
1657
std::shared_ptr<BackingStore> backing_store =
1658
1658
memory->Buffer ()->GetBackingStore ();
You can’t perform that action at this time.
0 commit comments