Repository navigation
feat: add support for long-animation-frame script attribution - #49706
Conversation
|
No API review necessary. It's a backport of a Chromium CL. No API is changed on the Electron side. |
deepak1556
left a comment
There was a problem hiding this comment.
-
This needs a callout in the docs since the majority cases are apps with custom protocol. Possible good home would be under https://github.com/electron/electron/blob/main/docs/api/command-line-switches.md#chromium-flags
-
Can you add a test for the custom protocol case, you can use RemoteControlApp helper to run an isolated test with the feature enabled.
|
@deepak Thanks for the review! I can adjust the docs. The upstream CL has a test for the custom protocol case. (I just excluded tests from the backport.) Do we need an additional one in Electron? |
|
Yes having a test on our end would help to identify when the feature flag gets removed from upstream. The feature flag is not compile time validated on our end, so needs an integration test. |
ea630aa to
1e12528
Compare
|
@deepak1556 PR updated. |
|
Sorry about the test failures! Should hopefully be fixed now. EDIT: Looks like I'll still need to make some changes. Will do that soon. (Locally, the tests ran through fine.) |
|
Looks like we ran into #32001. As a result, Edit: Tests have succeeded now with the patch. |
|
Release Notes Persisted
|
|
I have automatically backported this PR to "39-x-y", please check out #49771 |
|
I have automatically backported this PR to "40-x-y", please check out #49772 |
|
I have automatically backported this PR to "41-x-y", please check out #49773 |
…tron#49706) * feat: add support for `long-animation-frame` script attribution * docs: document `AlwaysLogLOAFURL` * chore: add test * docs: adjust docs as per PR comment * fix: test failures * chore: simplify test * fix: tests on Windows and Linux
Description of Change
Fixes #47630.
Backports https://crrev.com/c/7510894 (minus the test changes) and adds an Electron-specific test.
The change is guarded behind the
AlwaysLogLOAFURLChromium feature (--enable-features=AlwaysLogLOAFURL), which is disabled by default. Thus, the change is very low risk and safe to backport.The backported CL makes it possible to get script attribution for
long-animation-framePerformanceObserverevents in Electron apps.long-animation-frameevents can be used to debug UI freezes. Script attribution via thesourceURLattribute lets the application developer figure out which script is slow.By default, script attribution is only available for http(s), blob, and data URLs. Electron apps use
file://or custom protocols. Hence, this feature is needed to get script attribution working in Electron apps.Checklist
npm testpassesRelease Notes
Notes: Added support for
long-animation-framescript attribution (via--enable-features=AlwaysLogLOAFURL).