Skip to content

Commit 0d5d171

Browse files
committed
[wasi] Stop using V8 fast API
1 parent 286ed38 commit 0d5d171

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/node_wasi.cc

+2-4
Original file line numberDiff line numberDiff line change
@@ -209,16 +209,14 @@ void WASI::New(const FunctionCallbackInfo<Value>& args) {
209209
template <typename FT, FT F, typename R, typename... Args>
210210
void WASI::WasiFunction<FT, F, R, Args...>::SetFunction(
211211
Environment* env, const char* name, Local<FunctionTemplate> tmpl) {
212-
auto c_function = CFunction::Make(FastCallback);
213212
Local<FunctionTemplate> t =
214213
FunctionTemplate::New(env->isolate(),
215214
SlowCallback,
216215
Local<Value>(),
217216
Local<Signature>(),
218217
sizeof...(Args),
219218
v8::ConstructorBehavior::kThrow,
220-
v8::SideEffectType::kHasSideEffect,
221-
&c_function);
219+
v8::SideEffectType::kHasSideEffect);
222220
const v8::NewStringType type = v8::NewStringType::kInternalized;
223221
Local<String> name_string =
224222
String::NewFromUtf8(env->isolate(), name, type).ToLocalChecked();
@@ -251,7 +249,7 @@ R WASI::WasiFunction<FT, F, R, Args...>::FastCallback(
251249
v8::Isolate* isolate = receiver->GetIsolate();
252250
if (wasi->memory_.IsEmpty()) {
253251
THROW_ERR_WASI_NOT_STARTED(isolate);
254-
return;
252+
return EinvalError<R>();
255253
}
256254
Local<ArrayBuffer> ab = wasi->memory_.Get(isolate)->Buffer();
257255
size_t mem_size = ab->ByteLength();

0 commit comments

Comments
 (0)