From 0d5d171017e857712093189f3a357cee862635e0 Mon Sep 17 00:00:00 2001 From: Andreas Haas Date: Fri, 21 Jun 2024 17:18:48 +0200 Subject: [PATCH] [wasi] Stop using V8 fast API --- src/node_wasi.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/node_wasi.cc b/src/node_wasi.cc index b77a1f57854261..fbeecb048cf1c3 100644 --- a/src/node_wasi.cc +++ b/src/node_wasi.cc @@ -209,7 +209,6 @@ void WASI::New(const FunctionCallbackInfo& args) { template void WASI::WasiFunction::SetFunction( Environment* env, const char* name, Local tmpl) { - auto c_function = CFunction::Make(FastCallback); Local t = FunctionTemplate::New(env->isolate(), SlowCallback, @@ -217,8 +216,7 @@ void WASI::WasiFunction::SetFunction( Local(), sizeof...(Args), v8::ConstructorBehavior::kThrow, - v8::SideEffectType::kHasSideEffect, - &c_function); + v8::SideEffectType::kHasSideEffect); const v8::NewStringType type = v8::NewStringType::kInternalized; Local name_string = String::NewFromUtf8(env->isolate(), name, type).ToLocalChecked(); @@ -251,7 +249,7 @@ R WASI::WasiFunction::FastCallback( v8::Isolate* isolate = receiver->GetIsolate(); if (wasi->memory_.IsEmpty()) { THROW_ERR_WASI_NOT_STARTED(isolate); - return; + return EinvalError(); } Local ab = wasi->memory_.Get(isolate)->Buffer(); size_t mem_size = ab->ByteLength();