Skip to content
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

document.clone().append(html) is not threadsafe #2281

Closed
jhy opened this issue Mar 2, 2025 · 0 comments
Closed

document.clone().append(html) is not threadsafe #2281

jhy opened this issue Mar 2, 2025 · 0 comments
Assignees
Labels
bug A confirmed bug, that we should fix fixed An {bug|improvement} that has been {fixed|implemented}
Milestone

Comments

@jhy
Copy link
Owner

jhy commented Mar 2, 2025

If multiple threads try to call document.clone().append(html), they will fail.

.append(html) uses the document's parser, and that is not being cloned along with the document. And so multiple threads are hitting the same parser, which is not thread safe.

This is the root cause of #2280

@jhy jhy self-assigned this Mar 2, 2025
@jhy jhy added the bug A confirmed bug, that we should fix label Mar 2, 2025
@jhy jhy added this to the 1.19.1 milestone Mar 2, 2025
@jhy jhy closed this as completed in d55469a Mar 2, 2025
jhy added a commit that referenced this issue Mar 2, 2025
@jhy jhy added the fixed An {bug|improvement} that has been {fixed|implemented} label Mar 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A confirmed bug, that we should fix fixed An {bug|improvement} that has been {fixed|implemented}
Projects
None yet
Development

No branches or pull requests

1 participant