Skip to content

Inspector session wrapObject wrapper #301

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 9, 2025
Merged

Inspector session wrapObject wrapper #301

merged 4 commits into from
Apr 9, 2025

Conversation

sjorsdonkers
Copy link
Contributor

@sjorsdonkers sjorsdonkers commented Apr 7, 2025

Things to consider:

  • Do we want to call this wrapObject or resolveNode?
  • Is it OK to pass the v8.RemoteObject? Since it is a CDP specific type I don't think there is a need to wrap it again.
  • Do we want this to exist at all or should CDP.dom.resolveNode() just hold this logic?
  • Currently we accept anytype. Alternatively this code take a parser.Node, which we would have to down cast to the correct type. How to do that is TBD, but needs to be figured out in the Browser anyway.
  • Temporary defaults are kept here as opposed to in the zig-v8 repo to give that repo a cleaner/more final interface.

Depends on: lightpanda-io/zig-v8-fork#49

pub fn findOrAddValue(env: *Env, value: anytype) !v8.Value {
comptime var ret: refl.Type = undefined;
comptime {
@setEvalBranchQuota(150_000); // Needed when this is called with a dom/node.zig.Union
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks painful

@krichprollsch krichprollsch merged commit 9b87782 into main Apr 9, 2025
9 checks passed
@krichprollsch krichprollsch deleted the wrapObject branch April 9, 2025 09:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants