[wpt-sync] Sync PR 41596 - Revert "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 41596 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/41596
Details from upstream follow.
Noam Rosenthal <nrosenthal@chromium.org> wrote:
Revert "LoAF: support approximate source locations for promise resolvers"
This reverts commit 07a41b1a0d49acd929ba716332c65ec7c8c55a2b.
Reason for revert: performance regression.
See https://bugs.chromium.org/p/chromium/issues/detail?id=1475117Will try to refactor and run pinpoint on the CL with that test.
Original change's description:
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 contributes to the LoAF.Bug: 1392685
Change-Id: I268ebbbf035b0800a5d1bd61cd939e46533fe064
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4783320
Reviewed-by: Yoav Weiss \<yoavweiss@chromium.org>
Commit-Queue: Noam Rosenthal \<nrosenthal@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1186486}Bug: 1392685
Change-Id: I11a4618e5e9be83c116547d63483bae4c8954d13
No-Presubmit: true
No-Tree-Checks: true
No-Try: trueReviewed-on: https://chromium-review.googlesource.com/4803709
WPT-Export-Revision: 6762510c96c1caed46dba6d2daa758e82c93e8f9
| Assignee | ||
Comment 1•2 years ago
|
||
| Assignee | ||
Comment 2•2 years ago
|
||
| Assignee | ||
Comment 3•2 years ago
|
||
| Assignee | ||
Comment 4•2 years ago
|
||
| Assignee | ||
Comment 5•2 years ago
|
||
| Assignee | ||
Comment 6•2 years ago
|
||
| Assignee | ||
Comment 7•2 years ago
|
||
Comment 9•2 years ago
|
||
| bugherder | ||
Description
•