Closed Bug 2076192 Opened 1 month ago Closed 1 month ago

[wpt-sync] Sync PR 63017 - Fix crash when XPath step predicate is a variable reference

Categories

(Core :: XSLT, task, P4)

task

Tracking

()

RESOLVED FIXED
159 Branch
Tracking Status
firefox159 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 63017 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/63017
Details from upstream follow.

Mason Freed <masonf@chromium.org> wrote:

Fix crash when XPath step predicate is a variable reference

When a step predicate is a variable reference (e.g. "any[$any]"),
Step::Optimize() calls Predicate::IsContextPositionSensitive(), which
calls VariableReference::ResultType(). Previously, ResultType() hit
NOTREACHED().

Since VariableReference::Evaluate() always returns a string Value,
return Value::kStringValue from VariableReference::ResultType().

Fixed: 564353354
Change-Id: Ib6a77d71bc9ee48fef2bce6f8eb15fd69e2e8124
Reviewed-on: https://chromium-review.googlesource.com/8470028
WPT-Export-Revision: d0ee2d2fa7057affd30e056108f0169aa1d121df

Component: web-platform-tests → XSLT
Product: Testing → Core

CI Results

Ran 11 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 36 tests

Status Summary

Firefox

OK : 34
PASS : 1[GitHub] 2[Gecko-linux2204-64-wayland-debug, Gecko-linux2204-64-wayland-opt] 1147[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
FAIL : 21

Chrome

CRASH: 1

Safari

PASS : 1

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

  • /domxpath/evaluator-different-document.tentative.html [wpt.fyi]
    • evaluate operation on XML document, context node in HTML document, no namespace resolver: FAIL
    • evaluate operation on HTML document, context node in XML document, no namespace resolver: FAIL
    • evaluate operation on XML document, context node in HTML document, with namespace resolver: FAIL
    • evaluate operation on HTML document, context node in XML document, with namespace resolver: FAIL
  • /domxpath/expression-cross-realm.tentative.html [wpt.fyi]
    • expression from realm with XML associated document, context node in XML document, no namespace resolver: FAIL
    • expression from realm with XML associated document, context node in HTML document, no namespace resolver: FAIL
    • expression from realm with HTML associated document, context node in XML document, no namespace resolver: FAIL
    • expression from realm with HTML associated document, context node in HTML document, no namespace resolver: FAIL
  • /domxpath/expression-different-document.tentative.html [wpt.fyi]
    • expression from XML document, context node in HTML document, no namespace resolver: FAIL
    • expression from HTML document, context node in XML document, no namespace resolver: FAIL
    • expression from XML document, context node in HTML document, with namespace resolver: FAIL
    • expression from HTML document, context node in XML document, with namespace resolver: FAIL
  • /domxpath/fn-lang.html [wpt.fyi]
    • lang("ko"): <root><unmatch xml:lang="Ko"/></root>: FAIL
  • /domxpath/resolver-callback-interface-cross-realm.tentative.html [wpt.fyi]
    • XPathNSResolver is cross-realm plain object without 'lookupNamespaceURI' property: FAIL
    • XPathNSResolver is cross-realm plain object with non-callable 'lookupNamespaceURI' property: FAIL
    • XPathNSResolver is cross-realm non-callable revoked Proxy: FAIL
    • XPathNSResolver is cross-realm callable revoked Proxy: FAIL
    • XPathNSResolver is cross-realm plain object with revoked Proxy as 'lookupNamespaceURI' property: FAIL
  • /domxpath/text-html-attributes.html [wpt.fyi]
    • Select SVG element based on mixed case attribute: FAIL
    • Select both HTML and SVG elements based on mixed case attribute: FAIL
    • Select SVG elements with refX attribute: FAIL
Pushed by wptsync@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/66991975b832 https://hg.mozilla.org/integration/autoland/rev/23256f266dd4 [wpt PR 63017] - Fix crash when XPath step predicate is a variable reference, a=testonly
Status: NEW → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 159 Branch
You need to log in before you can comment on or make changes to this bug.