Skip to content

Commit

Permalink
Reverts #192 (#193)
Browse files Browse the repository at this point in the history
* [wasi] Stop using V8 fast API

* Revert "[wasi] Stop using V8 fast API"

This reverts commit 0d5d171.

* Revert "[v8] Stop using deprecated fields of v8::FastApiCallbackOptions (#192)"

This reverts commit 286ed38.
  • Loading branch information
gahaas authored and pthier committed Oct 2, 2024
1 parent b85f798 commit 58d5221
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/node_wasi.cc
Original file line number Diff line number Diff line change
Expand Up @@ -258,12 +258,12 @@ R WASI::WasiFunction<FT, F, R, Args...>::FastCallback(
THROW_ERR_WASI_NOT_STARTED(isolate);
return EinvalError<R>();
}
Local<ArrayBuffer> ab = wasi->memory_.Get(isolate)->Buffer();
size_t mem_size = ab->ByteLength();
char* mem_data = static_cast<char*>(ab->Data());
CHECK_NOT_NULL(mem_data);
uint8_t* memory = nullptr;
CHECK(LIKELY(options.wasm_memory->getStorageIfAligned(&memory)));

return F(*wasi, {mem_data, mem_size}, args...);
return F(*wasi,
{reinterpret_cast<char*>(memory), options.wasm_memory->length()},
args...);
}

namespace {
Expand Down

0 comments on commit 58d5221

Please sign in to comment.