mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-10-29 23:23:28 +00:00
Re-introduce postAttach
index_get seems to be ~1000x slower than setting the value directly on the v8.Object. There's a lot of information on "v8 fast properties", and values set directly on objects seem to be heavily optimized. Still, I can't imagine indexed properties are always _that_ slow, so I must be doing something wrong. Still, for now, this brings back the original functionality / behavior / perf. Introduce the ability for Zig functions to take a Env.JsObject parameter. While this isn't currently being used, it aligns with bringing back the postAttach / JSObject functionality in main. Moved function *State to the end of the function list (making it consistent with getters and setters). The optional Env.JsObject parameter comes after the optional state. Removed some uncessary arena deinits from a few webapis.
This commit is contained in:
@@ -480,7 +480,7 @@ pub const JsRunner = struct {
|
||||
return self.executor.exec(src, null) catch |err| {
|
||||
if (try try_catch.err(self.arena)) |msg| {
|
||||
err_msg.* = msg;
|
||||
std.debug.print("Error runnign script: {s}\n", .{msg});
|
||||
std.debug.print("Error running script: {s}\n", .{msg});
|
||||
}
|
||||
return err;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user