Files
sousa-gecko/testing/web-platform/tests/js-self-profiling
Thomas Bertet aafc401884 Bug 2047245 [wpt PR 60590] - Add js-profiling-mode enum Document Policy with eager/lazy V8 profiler initialization, a=testonly
Automatic update from web-platform-tests
Add js-profiling-mode enum Document Policy with eager/lazy V8 profiler initialization

Introduce a new `Document-Policy` feature named `js-profiling-mode` that accepts
enum values `eager` and `lazy`, allowing pages to defer V8 CPU profiler
initialization until the first `new Profiler()` call.

This is the first enum-type Document Policy feature in Chromium.
Changes:
     - Add `kJSProfilingMode` mojom enum entry and JSON5 feature definition
     - Extend Document Policy parser and serializer to handle enum (Token) values
     - Add `GetDocumentPolicyValue()` to SecurityContext/ExecutionContext
     - Implement lazy mode in ProfilerGroup: defers V8 profiler init to first use
     - Gate behind `DocumentPolicyJSProfilingMode` runtime feature flag
     - Maintain backward compatibility with existing `js-profiling` boolean policy

Bug: https://issues.chromium.org/issues/473861788
Change-Id: If3e61ee55318b46bf2b07a16d113a5a388f7bf67
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7575656
Reviewed-by: Ari Chivukula <arichiv@chromium.org>
Commit-Queue: Michal Mocny <mmocny@chromium.org>
Reviewed-by: Ken Buchanan <kenrb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1658751}

--

wpt-commits: fe407963fa1a07a34dc55e6089ba9cd08a3803e8
wpt-pr: 60590
2026-07-12 11:57:25 +00:00
..
…