Closed Bug 2047245 Opened 1 month ago Closed 5 days ago

[wpt-sync] Sync PR 60590 - Add js-profiling-mode enum Document Policy with eager/lazy V8 profiler initialization

Categories

(Core :: DOM: Performance APIs, task, P4)

task

Tracking

()

RESOLVED FIXED
154 Branch
Tracking Status
firefox154 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 60590 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/60590
Details from upstream follow.

Thomas Bertet <thomas.bertet@gmail.com> wrote:

Add js-profiling-mode enum Document Policy with eager/lazy V8 profiler initialization

Introduce a new Document-Policy feature 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/7575656
WPT-Export-Revision: b4bb01994a31a2e91b61f914868da67f7926d673

Component: web-platform-tests → DOM: Performance APIs
Product: Testing → Core

CI Results

Ran 9 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 3 tests and 1 subtests

Status Summary

Firefox

OK : 3
FAIL: 5

Chrome

OK : 3
PASS: 1
FAIL: 4

Safari

OK : 3
FAIL: 5

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

  • /js-self-profiling/js-profiling-mode/eager.https.html [wpt.fyi]: OK [GitHub], SKIP [Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt] (Chrome: OK, Safari: OK)
    • js-profiling-mode=eager should allow profiling: FAIL (Chrome: FAIL, Safari: FAIL)
    • js-profiling-mode=eager should support concurrent profilers: FAIL (Chrome: FAIL, Safari: FAIL)
  • /js-self-profiling/js-profiling-mode/lazy.https.html [wpt.fyi]: OK [GitHub], SKIP [Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt] (Chrome: OK, Safari: OK)
    • js-profiling-mode=lazy should allow profiling: FAIL (Chrome: FAIL, Safari: FAIL)
    • js-profiling-mode=lazy should support concurrent profilers: FAIL (Chrome: FAIL, Safari: FAIL)
  • /js-self-profiling/js-profiling-mode/unknown.https.html [wpt.fyi]: OK [GitHub], SKIP [Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt] (Chrome: OK, Safari: OK)
    • js-profiling-mode=unknown (invalid token) should not allow profiling: FAIL (Chrome: PASS, Safari: FAIL)

Tests Disabled in Gecko Infrastructure

  • /js-self-profiling/js-profiling-mode/eager.https.html [wpt.fyi]: OK [GitHub], SKIP [Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt] (Chrome: OK, Safari: OK)
  • /js-self-profiling/js-profiling-mode/lazy.https.html [wpt.fyi]: OK [GitHub], SKIP [Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt] (Chrome: OK, Safari: OK)
  • /js-self-profiling/js-profiling-mode/unknown.https.html [wpt.fyi]: OK [GitHub], SKIP [Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt] (Chrome: OK, Safari: OK)
Pushed by wptsync@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/aafc40188420 https://hg.mozilla.org/integration/autoland/rev/7226a6adc975 [wpt PR 60590] - Add js-profiling-mode enum Document Policy with eager/lazy V8 profiler initialization, a=testonly
Status: NEW → RESOLVED
Closed: 5 days ago
Resolution: --- → FIXED
Target Milestone: --- → 154 Branch
You need to log in before you can comment on or make changes to this bug.