Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fixup! src: use Utf8Value and TwoByteValue instead of V8 helpers
  • Loading branch information
addaleax committed Oct 14, 2025
commit c05de02ea134b3b0543e027269cdbbd3f40a551f
8 changes: 5 additions & 3 deletions src/api/hooks.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ using v8::Isolate;
using v8::Just;
using v8::Local;
using v8::Maybe;
using v8::NewStringType;
using v8::Nothing;
using v8::Object;
using v8::String;
Expand Down Expand Up @@ -209,9 +210,10 @@ async_context EmitAsyncInit(Isolate* isolate,
std::string_view name,
async_id trigger_async_id) {
HandleScope handle_scope(isolate);
Local<String> type = ToV8Value(isolate->GetCurrentContext(), name, isolate)
.ToLocalChecked()
.As<String>();
Local<String> type =
String::NewFromUtf8(
isolate, name.data(), NewStringType::kInternalized, name.size())
.ToLocalChecked();
return EmitAsyncInit(isolate, resource, type, trigger_async_id);
}

Expand Down
Loading