Update src/browser/js/Local.zig

Co-authored-by: Pierre Tachoire <pierre@lightpanda.io>
This commit is contained in:
Karl Seguin
2026-02-09 16:53:28 +08:00
committed by Karl Seguin
parent c4e82407ec
commit 6130ed17a6

View File

@@ -206,7 +206,7 @@ pub fn mapZigInstanceToJs(self: *const Local, js_obj_handle: ?*const v8.Object,
// if (resolved.finalizer_from_v8) |finalizer| { // if (resolved.finalizer_from_v8) |finalizer| {
// But that's a runtime check. // But that's a runtime check.
// Instead, we check if the base has finalizer. The assumption // Instead, we check if the base has finalizer. The assumption
// here is that if a resolve type has a finalizer, than the base // here is that if a resolve type has a finalizer, then the base
// should have a finalizer too. // should have a finalizer too.
const fc = try ctx.createFinalizerCallback(gop.value_ptr.*, resolved.ptr, resolved.finalizer_from_zig.?); const fc = try ctx.createFinalizerCallback(gop.value_ptr.*, resolved.ptr, resolved.finalizer_from_zig.?);
{ {