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) {
72
72
} \
73
73
} while (0 )
74
74
75
-
76
75
using v8::Array;
77
76
using v8::BackingStore;
78
77
using v8::BigInt;
@@ -1641,18 +1640,18 @@ void WASI::SockShutdown(const FunctionCallbackInfo<Value>& args) {
1641
1640
1642
1641
void WASI::_SetMemory (const FunctionCallbackInfo<Value>& args) {
1643
1642
WASI* wasi;
1643
+ ASSIGN_OR_RETURN_UNWRAP (&wasi, args.This ());
1644
1644
CHECK_EQ (args.Length (), 1 );
1645
1645
if (!args[0 ]->IsWasmMemoryObject ()) {
1646
1646
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" );
1648
1649
}
1649
- ASSIGN_OR_RETURN_UNWRAP (&wasi, args.This ());
1650
1650
wasi->memory_ .Reset (wasi->env ()->isolate (), args[0 ].As <WasmMemoryObject>());
1651
1651
}
1652
1652
1653
1653
1654
1654
uvwasi_errno_t WASI::backingStore (char ** store, size_t * byte_length) {
1655
- Environment* env = this ->env ();
1656
1655
Local<WasmMemoryObject> memory = PersistentToLocal::Strong (this ->memory_ );
1657
1656
std::shared_ptr<BackingStore> backing_store =
1658
1657
memory->Buffer ()->GetBackingStore ();
You can’t perform that action at this time.
0 commit comments