Closed Bug 1849816 Opened 2 years ago Closed 2 years ago

[wpt-sync] Sync PR 41596 - Revert "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 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=1475117

Will 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: true

Reviewed-on: https://chromium-review.googlesource.com/4803709
WPT-Export-Revision: 6762510c96c1caed46dba6d2daa758e82c93e8f9

PR 41596 applied with additional changes from upstream: aff764c5e069497e4de7ed22d163c6e35afcced4
The PR was not expected to affect any tests, but the try push wasn't a success. Check the try results for infrastructure issues
Test result changes from PR not available.
Test result changes from PR not available.
Test result changes from PR not available.
Test result changes from PR not available.
Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/d93cf3902160 [wpt PR 41596] - Revert "LoAF: support approximate source locations for promise resolvers", 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.