File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -72,7 +72,6 @@ inline void Debug(WASI* wasi, Args&&... args) {
7272 } \
7373 } while (0 )
7474
75-
7675using v8::Array;
7776using v8::BackingStore;
7877using v8::BigInt;
@@ -1641,18 +1640,18 @@ void WASI::SockShutdown(const FunctionCallbackInfo<Value>& args) {
16411640
16421641void WASI::_SetMemory (const FunctionCallbackInfo<Value>& args) {
16431642 WASI* wasi;
1643+ ASSIGN_OR_RETURN_UNWRAP (&wasi, args.This ());
16441644 CHECK_EQ (args.Length (), 1 );
16451645 if (!args[0 ]->IsWasmMemoryObject ()) {
16461646 return node::THROW_ERR_INVALID_ARG_TYPE (
1647- env, " instance.exports.memory must be a WebAssembly.Memory object" );
1647+ wasi->env (),
1648+ " instance.exports.memory must be a WebAssembly.Memory object" );
16481649 }
1649- ASSIGN_OR_RETURN_UNWRAP (&wasi, args.This ());
16501650 wasi->memory_ .Reset (wasi->env ()->isolate (), args[0 ].As <WasmMemoryObject>());
16511651}
16521652
16531653
16541654uvwasi_errno_t WASI::backingStore (char ** store, size_t * byte_length) {
1655- Environment* env = this ->env ();
16561655 Local<WasmMemoryObject> memory = PersistentToLocal::Strong (this ->memory_ );
16571656 std::shared_ptr<BackingStore> backing_store =
16581657 memory->Buffer ()->GetBackingStore ();
You can’t perform that action at this time.
0 commit comments