Closed Bug 1848969 Opened 2 years ago Closed 2 years ago

[wpt-sync] Sync PR 41490 - LoAF: support approximate source locations for promise resolvers

Categories

(Testing :: web-platform-tests, task, P4)

task

Tracking

(firefox119 fixed)

RESOLVED FIXED
119 Branch
Tracking Status
firefox119 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Noam Rosenthal <nrosenthal@chromium.org> wrote:

LoAF: support approximate source locations for promise resolvers

Attribute the source location of a promise resolver that contributed
to LoAF to the script that created it, e.g. the script that called
fetch().

Getting the exact source location of the promise resolver itself
would require capturing a stack trace, which might be too much
overhead, so this is the next best thing. We can revise in the future
whether a shallow stack trace is something we're OK with in some
circumstances.

Note that it's impossible to get the location of the actual then(),
as that's a microtask that's batched together with all the rest of
the microtasks (e.g. other then()s of the same promise).

The animation frame monitor maintains a weak map between the promise
resolver and the source location of the event
listener/script-block/callback that was responsible for creating it.
This source location is then used when a promise is resolved and the
resolution task is a long script that contibutes to the LoAF.

Bug: 1392685
Change-Id: I268ebbbf035b0800a5d1bd61cd939e46533fe064
Reviewed-on: https://chromium-review.googlesource.com/4783320
WPT-Export-Revision: 7ad8348164ef251454b4a82d268c7dd8eea72ae5

CI Results

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

Total 1 tests and 3 subtests

Status Summary

Firefox

ERROR: 1

Chrome

OK : 1
FAIL : 3

Safari

ERROR: 1

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/4265aea2ef5f [wpt PR 41490] - LoAF: support approximate source locations for promise resolvers, a=testonly https://hg.mozilla.org/integration/autoland/rev/fa38f4ecc2fc [wpt PR 41490] - Update wpt metadata, a=testonly
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 119 Branch
You need to log in before you can comment on or make changes to this bug.