[wpt-sync] Sync PR 41490 - LoAF: support approximate source locations for promise resolvers
Categories
(Testing :: web-platform-tests, task, P4)
Tracking
(firefox119 fixed)
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
Assignee | ||
Comment 1•2 years ago
|
||
Assignee | ||
Comment 2•2 years ago
|
||
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
- /long-animation-frame/tentative/loaf-source-location-promise-resolver.html [wpt.fyi]:
ERROR
(Chrome:OK
, Safari:ERROR
)
Comment 4•2 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/4265aea2ef5f
https://hg.mozilla.org/mozilla-central/rev/fa38f4ecc2fc
Description
•