Skip to content

Conversation

@karlseguin
Copy link
Collaborator

When you clone a processing_node via the node_clone_node, or directly via the processing_node copy, you end up in _dom_pi_copy:
https://github.com/lightpanda-io/libdom/blob/da8b967905a38455e4f6b75cc9ad2767bae3ccde/src/core/pi.c#L104

For whatever, reason, the node created here gets a vtable that doesn't seem compatible with how we cast vtables in netsurf.zig. For now, a simple fix is to create a new new and copy the attributes over.

Fixes #123 and a WPT crash.

When you clone a processing_node via the node_clone_node, or directly via the
processing_node copy, you end up in _dom_pi_copy:
https://github.com/lightpanda-io/libdom/blob/da8b967905a38455e4f6b75cc9ad2767bae3ccde/src/core/pi.c#L104

For whatever, reason, the node created here gets a vtable that doesn't seem
compatible with how we cast vtables in netsurf.zig. For now, a simple fix is
to create a new new and copy the attributes over.

Fixes #123 and a WPT crash.
@krichprollsch krichprollsch merged commit e603a17 into main Apr 23, 2025
12 checks passed
@krichprollsch krichprollsch deleted the processing_instruction_clone branch April 23, 2025 07:51
@github-actions github-actions bot locked and limited conversation to collaborators Apr 23, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

dom: processus instruction cloneNode crash

3 participants