Problem: Crash when evaluating an XPath expression against a document that has no root element. Cause: mirror_node()’s DOCUMENT_NODE branch unconditionally mirrored document.document_element(). But a document may lack a root element — in which case, document_element() returns null. Fix: Return null from mirror_node() when the document has no root element. (The caller already maps a null mirror result to a failed evaluation, and raises an error in that case.) Fixes https://github.com/LadybirdBrowser/ladybird/issues/10004 |
||
|---|---|---|
| .. | ||
| XPath.cpp | ||
| XPath.h | ||
| XPathEvaluator.cpp | ||
| XPathEvaluator.h | ||
| XPathEvaluator.idl | ||
| XPathExpression.cpp | ||
| XPathExpression.h | ||
| XPathExpression.idl | ||
| XPathNSResolver.cpp | ||
| XPathNSResolver.h | ||
| XPathNSResolver.idl | ||
| XPathResult.cpp | ||
| XPathResult.h | ||
| XPathResult.idl | ||