TaskAttribution: Instrument NavigateEvent.intercept() handlers [chromium/src : main]

0 views
Skip to first unread message

Michal Mocny (Gerrit)

unread,
Mar 7, 2026, 8:23:13 AMMar 7
to Scott Haseley, Chromium LUCI CQ, chromium...@chromium.org, Kentaro Hara, Raphael Kubo da Costa, blink-revie...@chromium.org, blink-...@chromium.org, chikamu...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, scheduler-...@chromium.org, web-schedulin...@chromium.org
Attention needed from Scott Haseley

Michal Mocny voted and added 4 comments

Votes added by Michal Mocny

Code-Review+1

4 comments

Patchset-level comments
File-level comment, Patchset 2 (Latest):
Michal Mocny . resolved

I know its still WIP, but endorsing this approach :D

Commit Message
Line 18, Patchset 2 (Latest):synchronous events, we never want to overwrite the current staet, but
Michal Mocny . unresolved

state

File third_party/blink/renderer/core/scheduler/task_attribution_tracker_impl.cc
Line 169, Patchset 2 (Latest): // Always propagate `task_state`, even if it's null, since the current state
// may not be null.
Michal Mocny . unresolved

it took me a bit to parse, but I think this is saying "this might be used to clear current task state", right?

File third_party/blink/renderer/platform/scheduler/public/task_attribution_tracker.h
Line 161, Patchset 2 (Latest): // task state, regardless of whether JavaScript is running or not. Typically
// nested dispatch (e.g. events) uses the current state, but in rare cases
// this needs to be overridden, such as with the navigation API.
Michal Mocny . resolved

Patch LGTM but this detail I need to understand better some (future) day.

Open in Gerrit

Related details

Attention is currently required from:
  • Scott Haseley
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I337afcc951b2588faa489c8139dad5ce24518ca3
Gerrit-Change-Number: 7645691
Gerrit-PatchSet: 2
Gerrit-Owner: Scott Haseley <shas...@chromium.org>
Gerrit-Reviewer: Michal Mocny <mmo...@chromium.org>
Gerrit-Reviewer: Scott Haseley <shas...@chromium.org>
Gerrit-CC: Kentaro Hara <har...@chromium.org>
Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
Gerrit-Attention: Scott Haseley <shas...@chromium.org>
Gerrit-Comment-Date: Sat, 07 Mar 2026 13:23:06 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

AI Code Reviewer (Gerrit)

unread,
Mar 7, 2026, 8:24:57 AMMar 7
to Scott Haseley, Michal Mocny, Chromium LUCI CQ, chromium...@chromium.org, Kentaro Hara, Raphael Kubo da Costa, blink-revie...@chromium.org, blink-...@chromium.org, chikamu...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, scheduler-...@chromium.org, web-schedulin...@chromium.org
Attention needed from Scott Haseley

AI Code Reviewer added 1 comment

File third_party/blink/renderer/platform/bindings/callback_function_base.h
Line 135, Patchset 2 (Latest): void SetTaskState(scheduler::TaskAttributionInfo* task,
AI Code Reviewer . unresolved

Blink Style Guide: Prefer enums or StrongAliases to bare bools for function parameters. The boolean parameter 'should_propagate_ignoring_top_level' is not obvious from the function name 'SetTaskState'. Consider using an enum or base::StrongAlias to improve readability at call sites.

To keep this interaction as brief and non-intrusive as possible, please consider responding with one of following options:
**Done** | **OK But Won't Fix**: reason | **Later**: b/<bug_id> | **Invalid:** reason


_This comment was generated by [Experimental Blink C++ Code Review Agent](http://go/blink-c++-code-review-agent)._
_AI reviews can sometimes be inaccurate; We appreciate your 🙏 feedback 🙏 to help us improve._
_[File a bug](http://go/blink-c++-code-review-agent-feedback) | [Provide feedback on chat](https://chat.google.com/room/AAQA0zhQHe0?cls=4) | [Opt-out](https://ganpati2.corp.google.com/group/peep-genai-blink-agent-optout.prod)_

Open in Gerrit

Related details

Attention is currently required from:
  • Scott Haseley
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I337afcc951b2588faa489c8139dad5ce24518ca3
Gerrit-Change-Number: 7645691
Gerrit-PatchSet: 2
Gerrit-Owner: Scott Haseley <shas...@chromium.org>
Gerrit-Reviewer: Michal Mocny <mmo...@chromium.org>
Gerrit-Reviewer: Scott Haseley <shas...@chromium.org>
Gerrit-CC: AI Code Reviewer <peep-gen...@system.gserviceaccount.com>
Gerrit-CC: Kentaro Hara <har...@chromium.org>
Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
Gerrit-Attention: Scott Haseley <shas...@chromium.org>
Gerrit-Comment-Date: Sat, 07 Mar 2026 13:24:51 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Michal Mocny (Gerrit)

unread,
Mar 7, 2026, 2:59:01 PMMar 7
to Scott Haseley, AI Code Reviewer, Chromium LUCI CQ, chromium...@chromium.org, Kentaro Hara, Raphael Kubo da Costa, blink-revie...@chromium.org, blink-...@chromium.org, chikamu...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, scheduler-...@chromium.org, web-schedulin...@chromium.org
Attention needed from Scott Haseley

Michal Mocny voted and added 4 comments

Votes added by Michal Mocny

Code-Review+1

4 comments

File third_party/blink/renderer/core/navigation_api/navigation_intercept_options.idl
Line 6, Patchset 3:[SupportsTaskAttribution]
Michal Mocny . resolved

Oh nice, I didn't know we have this.

Q: Would it be possible to make one of these (decorators?) for the PaintTimingMixin?

File third_party/blink/renderer/core/scheduler/task_attribution_top_level_override_scope.h
Line 30, Patchset 3: using PassKeyType = base::PassKey<NavigateEvent>;
Michal Mocny . unresolved

This is public-- is this a temporary and eventually will be private + friend list? Or is this sorta just a way to mark "be extra careful"?

Line 19, Patchset 3:// An RAII scope that forces Task Attribution to ingore the top-level
Michal Mocny . unresolved

Please fix this WARNING reported by Spellchecker: "ingore" is a possible misspelling of "ignore".

To bypass Spellchecker, add a f...

"ingore" is a possible misspelling of "ignore".

To bypass Spellchecker, add a footer with DISABLE_SPELLCHECKER

File third_party/blink/renderer/core/scheduler/task_attribution_tracker_impl.cc
Line 169, Patchset 2: // Always propagate `task_state`, even if it's null, since the current state

// may not be null.
Michal Mocny . resolved

it took me a bit to parse, but I think this is saying "this might be used to clear current task state", right?

Michal Mocny

Done

Open in Gerrit

Related details

Attention is currently required from:
  • Scott Haseley
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I337afcc951b2588faa489c8139dad5ce24518ca3
Gerrit-Change-Number: 7645691
Gerrit-PatchSet: 3
Gerrit-Owner: Scott Haseley <shas...@chromium.org>
Gerrit-Reviewer: Michal Mocny <mmo...@chromium.org>
Gerrit-Reviewer: Scott Haseley <shas...@chromium.org>
Gerrit-CC: AI Code Reviewer <peep-gen...@system.gserviceaccount.com>
Gerrit-CC: Kentaro Hara <har...@chromium.org>
Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
Gerrit-Attention: Scott Haseley <shas...@chromium.org>
Gerrit-Comment-Date: Sat, 07 Mar 2026 19:58:54 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: Michal Mocny <mmo...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Michal Mocny (Gerrit)

unread,
Mar 7, 2026, 2:59:36 PMMar 7
to Scott Haseley, AI Code Reviewer, Chromium LUCI CQ, chromium...@chromium.org, Kentaro Hara, Raphael Kubo da Costa, blink-revie...@chromium.org, blink-...@chromium.org, chikamu...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, scheduler-...@chromium.org, web-schedulin...@chromium.org
Attention needed from Scott Haseley

Michal Mocny voted and added 1 comment

Votes added by Michal Mocny

Code-Review+1

1 comment

File third_party/blink/renderer/core/scheduler/task_attribution_top_level_override_scope.h
Line 19, Patchset 3:// An RAII scope that forces Task Attribution to ingore the top-level
Michal Mocny . resolved

Please fix this WARNING reported by Spellchecker: "ingore" is a possible misspelling of "ignore".

To bypass Spellchecker, add a f...

"ingore" is a possible misspelling of "ignore".

To bypass Spellchecker, add a footer with DISABLE_SPELLCHECKER

Michal Mocny

Done

Open in Gerrit

Related details

Attention is currently required from:
  • Scott Haseley
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I337afcc951b2588faa489c8139dad5ce24518ca3
Gerrit-Change-Number: 7645691
Gerrit-PatchSet: 4
Gerrit-Owner: Scott Haseley <shas...@chromium.org>
Gerrit-Reviewer: Michal Mocny <mmo...@chromium.org>
Gerrit-Reviewer: Scott Haseley <shas...@chromium.org>
Gerrit-CC: AI Code Reviewer <peep-gen...@system.gserviceaccount.com>
Gerrit-CC: Kentaro Hara <har...@chromium.org>
Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
Gerrit-Attention: Scott Haseley <shas...@chromium.org>
Gerrit-Comment-Date: Sat, 07 Mar 2026 19:59:30 +0000
satisfied_requirement
unsatisfied_requirement
open
diffy

Scott Haseley (Gerrit)

unread,
Mar 7, 2026, 3:08:28 PMMar 7
to Michal Mocny, AI Code Reviewer, Chromium LUCI CQ, chromium...@chromium.org, Kentaro Hara, Raphael Kubo da Costa, blink-revie...@chromium.org, blink-...@chromium.org, chikamu...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, scheduler-...@chromium.org, web-schedulin...@chromium.org
Attention needed from Michal Mocny

Scott Haseley voted and added 7 comments

Votes added by Scott Haseley

Commit-Queue+1

7 comments

Patchset-level comments
Michal Mocny . resolved

I know its still WIP, but endorsing this approach :D

Scott Haseley

Thanks! It's better-ish now. Unfortunate this isn't straightforward, but I can live with this.

Commit Message
Line 18, Patchset 2:synchronous events, we never want to overwrite the current staet, but
Michal Mocny . resolved

state

Scott Haseley

Done

File third_party/blink/renderer/core/navigation_api/navigation_intercept_options.idl
Line 6, Patchset 3:[SupportsTaskAttribution]
Michal Mocny . resolved

Oh nice, I didn't know we have this.

Q: Would it be possible to make one of these (decorators?) for the PaintTimingMixin?

Scott Haseley

It's possible to add more, yes! But it depends on what for. This one isn't specced, it's just an internal convenience (an extended attribute), although I suspect we'll do something like this for AsyncContext. If you need it to be web-exposed (i.e. put in the spec), that might be different.

---

Aside: I'd like to use this more, but the InContext check doesn't work well with how low-level this is.

File third_party/blink/renderer/core/scheduler/task_attribution_top_level_override_scope.h
Line 30, Patchset 3: using PassKeyType = base::PassKey<NavigateEvent>;
Michal Mocny . unresolved

This is public-- is this a temporary and eventually will be private + friend list? Or is this sorta just a way to mark "be extra careful"?

Scott Haseley

Oh I just did that so I could use the type in NavigateEvent. Would using PassKey<> directly be better (I really don't know)?

---

I also don't want this to expand beyond this. We need a better v8 API, but that will take time.

File third_party/blink/renderer/core/scheduler/task_attribution_tracker_impl.cc
Line 169, Patchset 2: // Always propagate `task_state`, even if it's null, since the current state
// may not be null.
Michal Mocny . resolved

it took me a bit to parse, but I think this is saying "this might be used to clear current task state", right?

Scott Haseley

Obsolete

File third_party/blink/renderer/platform/bindings/callback_function_base.h
Line 135, Patchset 2: void SetTaskState(scheduler::TaskAttributionInfo* task,
AI Code Reviewer . resolved

Blink Style Guide: Prefer enums or StrongAliases to bare bools for function parameters. The boolean parameter 'should_propagate_ignoring_top_level' is not obvious from the function name 'SetTaskState'. Consider using an enum or base::StrongAlias to improve readability at call sites.

To keep this interaction as brief and non-intrusive as possible, please consider responding with one of following options:
**Done** | **OK But Won't Fix**: reason | **Later**: b/<bug_id> | **Invalid:** reason


_This comment was generated by [Experimental Blink C++ Code Review Agent](http://go/blink-c++-code-review-agent)._
_AI reviews can sometimes be inaccurate; We appreciate your 🙏 feedback 🙏 to help us improve._
_[File a bug](http://go/blink-c++-code-review-agent-feedback) | [Provide feedback on chat](https://chat.google.com/room/AAQA0zhQHe0?cls=4) | [Opt-out](https://ganpati2.corp.google.com/group/peep-genai-blink-agent-optout.prod)_

Scott Haseley

Obsolete.

File third_party/blink/renderer/platform/scheduler/public/task_attribution_tracker.h
Line 161, Patchset 2: // task state, regardless of whether JavaScript is running or not. Typically

// nested dispatch (e.g. events) uses the current state, but in rare cases
// this needs to be overridden, such as with the navigation API.
Michal Mocny . resolved

Patch LGTM but this detail I need to understand better some (future) day.

Scott Haseley

Obsolete-ish now.

Open in Gerrit

Related details

Attention is currently required from:
  • Michal Mocny
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I337afcc951b2588faa489c8139dad5ce24518ca3
Gerrit-Change-Number: 7645691
Gerrit-PatchSet: 5
Gerrit-Owner: Scott Haseley <shas...@chromium.org>
Gerrit-Reviewer: Michal Mocny <mmo...@chromium.org>
Gerrit-Reviewer: Scott Haseley <shas...@chromium.org>
Gerrit-CC: AI Code Reviewer <peep-gen...@system.gserviceaccount.com>
Gerrit-CC: Kentaro Hara <har...@chromium.org>
Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
Gerrit-Attention: Michal Mocny <mmo...@chromium.org>
Gerrit-Comment-Date: Sat, 07 Mar 2026 20:08:16 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: AI Code Reviewer <peep-gen...@system.gserviceaccount.com>
Comment-In-Reply-To: Michal Mocny <mmo...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Michal Mocny (Gerrit)

unread,
Mar 7, 2026, 3:15:03 PMMar 7
to Scott Haseley, AI Code Reviewer, Chromium LUCI CQ, chromium...@chromium.org, Kentaro Hara, Raphael Kubo da Costa, blink-revie...@chromium.org, blink-...@chromium.org, chikamu...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, scheduler-...@chromium.org, web-schedulin...@chromium.org
Attention needed from Scott Haseley

Michal Mocny voted and added 1 comment

Votes added by Michal Mocny

Code-Review+1

1 comment

File third_party/blink/renderer/core/scheduler/task_attribution_top_level_override_scope.h
Line 30, Patchset 3: using PassKeyType = base::PassKey<NavigateEvent>;
Michal Mocny . resolved

This is public-- is this a temporary and eventually will be private + friend list? Or is this sorta just a way to mark "be extra careful"?

Scott Haseley

Oh I just did that so I could use the type in NavigateEvent. Would using PassKey<> directly be better (I really don't know)?

---

I also don't want this to expand beyond this. We need a better v8 API, but that will take time.

Michal Mocny

Ah sorry, I misread what this did. This still only specifically allows the one class to use it. (I first read this as a public object/reference that anyone could just pass to the constructor)

Open in Gerrit

Related details

Attention is currently required from:
  • Scott Haseley
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I337afcc951b2588faa489c8139dad5ce24518ca3
    Gerrit-Change-Number: 7645691
    Gerrit-PatchSet: 5
    Gerrit-Owner: Scott Haseley <shas...@chromium.org>
    Gerrit-Reviewer: Michal Mocny <mmo...@chromium.org>
    Gerrit-Reviewer: Scott Haseley <shas...@chromium.org>
    Gerrit-CC: AI Code Reviewer <peep-gen...@system.gserviceaccount.com>
    Gerrit-CC: Kentaro Hara <har...@chromium.org>
    Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
    Gerrit-Attention: Scott Haseley <shas...@chromium.org>
    Gerrit-Comment-Date: Sat, 07 Mar 2026 20:14:57 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    Comment-In-Reply-To: Scott Haseley <shas...@chromium.org>
    Comment-In-Reply-To: Michal Mocny <mmo...@chromium.org>
    satisfied_requirement
    open
    diffy

    Scott Haseley (Gerrit)

    unread,
    Mar 7, 2026, 4:19:17 PMMar 7
    to Michal Mocny, AI Code Reviewer, Chromium LUCI CQ, chromium...@chromium.org, Kentaro Hara, Raphael Kubo da Costa, blink-revie...@chromium.org, blink-...@chromium.org, chikamu...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, scheduler-...@chromium.org, web-schedulin...@chromium.org

    Scott Haseley voted and added 1 comment

    Votes added by Scott Haseley

    Commit-Queue+1

    1 comment

    Patchset-level comments
    File-level comment, Patchset 8 (Latest):
    Scott Haseley . resolved

    Changed to ignore the known JS-is-running case, using UserNavigationInvolvement!

    Open in Gerrit

    Related details

    Attention set is empty
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I337afcc951b2588faa489c8139dad5ce24518ca3
    Gerrit-Change-Number: 7645691
    Gerrit-PatchSet: 8
    Gerrit-Owner: Scott Haseley <shas...@chromium.org>
    Gerrit-Reviewer: Michal Mocny <mmo...@chromium.org>
    Gerrit-Reviewer: Scott Haseley <shas...@chromium.org>
    Gerrit-CC: AI Code Reviewer <peep-gen...@system.gserviceaccount.com>
    Gerrit-CC: Kentaro Hara <har...@chromium.org>
    Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
    Gerrit-Comment-Date: Sat, 07 Mar 2026 21:19:08 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    open
    diffy

    Michal Mocny (Gerrit)

    unread,
    Mar 7, 2026, 4:26:46 PMMar 7
    to Scott Haseley, AI Code Reviewer, Chromium LUCI CQ, chromium...@chromium.org, Kentaro Hara, Raphael Kubo da Costa, blink-revie...@chromium.org, blink-...@chromium.org, chikamu...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, scheduler-...@chromium.org, web-schedulin...@chromium.org
    Attention needed from Scott Haseley

    Michal Mocny voted and added 1 comment

    Votes added by Michal Mocny

    Code-Review+1

    1 comment

    Patchset-level comments
    Michal Mocny . resolved

    I like it!

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Scott Haseley
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I337afcc951b2588faa489c8139dad5ce24518ca3
    Gerrit-Change-Number: 7645691
    Gerrit-PatchSet: 8
    Gerrit-Owner: Scott Haseley <shas...@chromium.org>
    Gerrit-Reviewer: Michal Mocny <mmo...@chromium.org>
    Gerrit-Reviewer: Scott Haseley <shas...@chromium.org>
    Gerrit-CC: AI Code Reviewer <peep-gen...@system.gserviceaccount.com>
    Gerrit-CC: Kentaro Hara <har...@chromium.org>
    Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
    Gerrit-Attention: Scott Haseley <shas...@chromium.org>
    Gerrit-Comment-Date: Sat, 07 Mar 2026 21:26:35 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    open
    diffy

    Scott Haseley (Gerrit)

    unread,
    Mar 7, 2026, 4:51:11 PMMar 7
    to Michal Mocny, AI Code Reviewer, Chromium LUCI CQ, chromium...@chromium.org, Kentaro Hara, Raphael Kubo da Costa, blink-revie...@chromium.org, blink-...@chromium.org, chikamu...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, scheduler-...@chromium.org, web-schedulin...@chromium.org
    Attention needed from Scott Haseley

    Scott Haseley voted Commit-Queue+2

    Commit-Queue+2
    Gerrit-Comment-Date: Sat, 07 Mar 2026 21:51:02 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    open
    diffy

    Chromium LUCI CQ (Gerrit)

    unread,
    Mar 7, 2026, 5:09:05 PMMar 7
    to Scott Haseley, Michal Mocny, AI Code Reviewer, chromium...@chromium.org, Kentaro Hara, Raphael Kubo da Costa, blink-revie...@chromium.org, blink-...@chromium.org, chikamu...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, scheduler-...@chromium.org, web-schedulin...@chromium.org

    Chromium LUCI CQ submitted the change

    Change information

    Commit message:
    TaskAttribution: Instrument NavigateEvent.intercept() handlers

    Propagate task state from NavigationEvent.intercept() to the `handler`
    and `precommitHandler`. This is needed for crrev.com/c/7638455 which
    changes how the SoftNavigationContext task state variable is set,
    wrapping individual events (including navigate) instead of creating a
    TaskScope associated with the same-document navigation IPC task.

    This is a bit different from other propagation in that we have to
    ignore the is-JavaScript-running "top level" because of how deeply
    nested the handler dispatch is under a ScriptState::Scope, which breaks
    out top-level check. To work around this, this CL introduced a top-level
    override scope -- pass-keyed to NavigateEvent -- to ignore the top-
    level check when propagating state. crbug.com/490536691 tracks improving
    this. We only use this with UserNavigationInvolvement::kNone, since
    the current task state should continue to be used if JS is executing.
    Bug: 418007230, 490536691
    Change-Id: I337afcc951b2588faa489c8139dad5ce24518ca3
    Reviewed-by: Michal Mocny <mmo...@chromium.org>
    Commit-Queue: Scott Haseley <shas...@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1595990}
    Files:
    • M third_party/blink/renderer/core/navigation_api/navigate_event.cc
    • M third_party/blink/renderer/core/navigation_api/navigation_intercept_options.idl
    • M third_party/blink/renderer/core/scheduler/build.gni
    • A third_party/blink/renderer/core/scheduler/task_attribution_top_level_override_scope.cc
    • A third_party/blink/renderer/core/scheduler/task_attribution_top_level_override_scope.h
    • M third_party/blink/renderer/core/scheduler/task_attribution_tracker_impl.cc
    • M third_party/blink/renderer/core/scheduler/task_attribution_tracker_impl.h
    • A third_party/blink/web_tests/wpt_internal/task-tracking/track-navigate-intercept.html
    Change size: M
    Delta: 8 files changed, 231 insertions(+), 2 deletions(-)
    Branch: refs/heads/main
    Submit Requirements:
    • requirement satisfiedCode-Review: +1 by Michal Mocny
    Open in Gerrit
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: merged
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I337afcc951b2588faa489c8139dad5ce24518ca3
    Gerrit-Change-Number: 7645691
    Gerrit-PatchSet: 9
    Gerrit-Owner: Scott Haseley <shas...@chromium.org>
    Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
    Gerrit-Reviewer: Michal Mocny <mmo...@chromium.org>
    Gerrit-Reviewer: Scott Haseley <shas...@chromium.org>
    Gerrit-CC: AI Code Reviewer <peep-gen...@system.gserviceaccount.com>
    open
    diffy
    satisfied_requirement
    Reply all
    Reply to author
    Forward
    0 new messages