Closed Bug 2089336 Opened 13 days ago Closed 4 days ago

[wpt-sync] Sync PR 64320 - script: No longer rely on the incumbent global when getting JSON attributes

Categories

(Core :: DOM: Core & HTML, task, P4)

task

Tracking

()

RESOLVED FIXED
162 Branch
Tracking Status
firefox162 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Martin Robinson <mrobinson@igalia.com> wrote:

script: No longer rely on the incumbent global when getting JSON attributes

The included test case panicked because it triggered an unhandled
promise rejection. The stringifier would run as part of that code path
without an incumbent global. This change fixes that in two places:

  1. Stringification in this case is wrapped in run_a_script so that the
    settings stack is never empty. Stringification can run code, so this
    is important.
  2. Instead of getting the incumbent global for CollectJSONAttributes,
    the global is fetched from the object using the SpiderMonkey
    API. This more closely matches Firefox.

Testing: This change adds a WPT crash test.
Fixes: #<!-- nolink -->49308.

Reviewed in servo/servo#49374

Whiteboard: [wptsync downstream] → [wptsync downstream error]
Component: web-platform-tests → DOM: Core & HTML
Product: Testing → Core
Whiteboard: [wptsync downstream error] → [wptsync downstream]
Whiteboard: [wptsync downstream] → [wptsync downstream error]
Whiteboard: [wptsync downstream error] → [wptsync downstream]

CI Results

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

Total 15 tests

Status Summary

Firefox

OK : 13
PASS: 1[Gecko-linux2204-64-wayland-debug, Gecko-linux2204-64-wayland-opt, GitHub] 176[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]

Chrome

PASS: 1

Safari

PASS: 1

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

Tests Disabled in Gecko Infrastructure

Pushed by wptsync@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/0510c341f729 https://hg.mozilla.org/integration/autoland/rev/bcf54d1a5bd4 [wpt PR 64320] - script: No longer rely on the incumbent global when getting JSON attributes, a=testonly
Status: NEW → RESOLVED
Closed: 4 days ago
Resolution: --- → FIXED
Target Milestone: --- → 162 Branch
You need to log in before you can comment on or make changes to this bug.