Isolate and HandleScope

This commit is contained in:
Karl Seguin
2025-12-31 18:52:47 +08:00
parent ca5a385b51
commit 363b95bdef
9 changed files with 224 additions and 91 deletions

View File

@@ -180,7 +180,8 @@ pub fn src(self: *const Function) ![]const u8 {
pub fn getPropertyValue(self: *const Function, name: []const u8) !?js.Value {
const ctx = self.ctx;
const key = v8.String.initUtf8(ctx.isolate, name);
const v8_isolate = v8.Isolate{ .handle = ctx.isolate.handle };
const key = v8.String.initUtf8(v8_isolate, name);
const handle = v8.c.v8__Object__Get(self.handle, ctx.v8_context.handle, key.handle) orelse {
return error.JsException;
};