Report initiator url for resources fetched in event handler. [chromium/src : main]

0 views
Skip to first unread message

Guohui Deng (Gerrit)

unread,
Jan 27, 2026, 12:43:26 PMJan 27
to Scott Haseley, Chromium LUCI CQ, Menard, Alexis, chromium...@chromium.org, Olga Gerchikov, Nate Chapin, blink-revie...@chromium.org, blink-re...@chromium.org, blink-re...@chromium.org, blink-revi...@chromium.org, blink-...@chromium.org, chikamu...@chromium.org, dtapuska+...@chromium.org, gavinp...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, loading...@chromium.org, scheduler-...@chromium.org, web-schedulin...@chromium.org
Attention needed from Scott Haseley

Guohui Deng voted and added 1 comment

Votes added by Guohui Deng

Commit-Queue+1

1 comment

Patchset-level comments
File-level comment, Patchset 1 (Latest):
Guohui Deng . resolved

Thanks for reviewing.

Open in Gerrit

Related details

Attention is currently required from:
  • Scott Haseley
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not 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: I1a9ade6c7b5ff27473e720181140b064f31a4ba7
Gerrit-Change-Number: 7520726
Gerrit-PatchSet: 1
Gerrit-Owner: Guohui Deng <guohu...@microsoft.com>
Gerrit-Reviewer: Guohui Deng <guohu...@microsoft.com>
Gerrit-Reviewer: Scott Haseley <shas...@chromium.org>
Gerrit-CC: Menard, Alexis <alexis...@intel.com>
Gerrit-CC: Nate Chapin <jap...@chromium.org>
Gerrit-CC: Olga Gerchikov <gerc...@microsoft.com>
Gerrit-Attention: Scott Haseley <shas...@chromium.org>
Gerrit-Comment-Date: Tue, 27 Jan 2026 17:43:17 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Scott Haseley (Gerrit)

unread,
Jan 27, 2026, 1:05:46 PMJan 27
to Guohui Deng, Chromium LUCI CQ, Menard, Alexis, chromium...@chromium.org, Olga Gerchikov, Nate Chapin, blink-revie...@chromium.org, blink-re...@chromium.org, blink-re...@chromium.org, blink-revi...@chromium.org, blink-...@chromium.org, chikamu...@chromium.org, dtapuska+...@chromium.org, gavinp...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, loading...@chromium.org, scheduler-...@chromium.org, web-schedulin...@chromium.org
Attention needed from Guohui Deng

Scott Haseley added 1 comment

Commit Message
Line 9, Patchset 1 (Latest):In addition, TaskAttribution uses a separate |taskIDForTest| for
scheduler::taskID(), which `task-tracking` tests rely on.
When TaskAttribution is forked with a variable setting to a new
value, |taskIDForTest| remains the same. This prevents
ResourceTimingContext propagated in event handler from conflicting
with the task-tracking tests.
Scott Haseley . unresolved

Would it be possible/easy to split this off into a separate CL and stack the other changes on top (gerrit supports this if you set the upstream branch in git)?

Open in Gerrit

Related details

Attention is currently required from:
  • Guohui Deng
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not 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: I1a9ade6c7b5ff27473e720181140b064f31a4ba7
    Gerrit-Change-Number: 7520726
    Gerrit-PatchSet: 1
    Gerrit-Owner: Guohui Deng <guohu...@microsoft.com>
    Gerrit-Reviewer: Guohui Deng <guohu...@microsoft.com>
    Gerrit-Reviewer: Scott Haseley <shas...@chromium.org>
    Gerrit-CC: Menard, Alexis <alexis...@intel.com>
    Gerrit-CC: Nate Chapin <jap...@chromium.org>
    Gerrit-CC: Olga Gerchikov <gerc...@microsoft.com>
    Gerrit-Attention: Guohui Deng <guohu...@microsoft.com>
    Gerrit-Comment-Date: Tue, 27 Jan 2026 18:05:37 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Guohui Deng (Gerrit)

    unread,
    Jan 27, 2026, 5:09:47 PMJan 27
    to Scott Haseley, Chromium LUCI CQ, Menard, Alexis, chromium...@chromium.org, Olga Gerchikov, Nate Chapin, blink-revie...@chromium.org, blink-re...@chromium.org, blink-re...@chromium.org, blink-revi...@chromium.org, blink-...@chromium.org, chikamu...@chromium.org, dtapuska+...@chromium.org, gavinp...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, loading...@chromium.org, scheduler-...@chromium.org, web-schedulin...@chromium.org
    Attention needed from Scott Haseley

    Guohui Deng added 1 comment

    Commit Message
    Line 9, Patchset 1:In addition, TaskAttribution uses a separate |taskIDForTest| for

    scheduler::taskID(), which `task-tracking` tests rely on.
    When TaskAttribution is forked with a variable setting to a new
    value, |taskIDForTest| remains the same. This prevents
    ResourceTimingContext propagated in event handler from conflicting
    with the task-tracking tests.
    Scott Haseley . resolved

    Would it be possible/easy to split this off into a separate CL and stack the other changes on top (gerrit supports this if you set the upstream branch in git)?

    Guohui Deng

    Done.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Scott Haseley
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not satisfiedCode-Owners
      • requirement is not satisfiedCode-Review
      • requirement is not 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: I1a9ade6c7b5ff27473e720181140b064f31a4ba7
      Gerrit-Change-Number: 7520726
      Gerrit-PatchSet: 2
      Gerrit-Owner: Guohui Deng <guohu...@microsoft.com>
      Gerrit-Reviewer: Guohui Deng <guohu...@microsoft.com>
      Gerrit-Reviewer: Scott Haseley <shas...@chromium.org>
      Gerrit-CC: Menard, Alexis <alexis...@intel.com>
      Gerrit-CC: Nate Chapin <jap...@chromium.org>
      Gerrit-CC: Olga Gerchikov <gerc...@microsoft.com>
      Gerrit-Attention: Scott Haseley <shas...@chromium.org>
      Gerrit-Comment-Date: Tue, 27 Jan 2026 22:09:38 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Scott Haseley <shas...@chromium.org>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Scott Haseley (Gerrit)

      unread,
      Feb 4, 2026, 3:09:20 PMFeb 4
      to Guohui Deng, Chromium LUCI CQ, Menard, Alexis, chromium...@chromium.org, Olga Gerchikov, Nate Chapin, blink-revie...@chromium.org, blink-re...@chromium.org, blink-re...@chromium.org, blink-revi...@chromium.org, blink-...@chromium.org, chikamu...@chromium.org, dtapuska+...@chromium.org, gavinp...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, loading...@chromium.org, scheduler-...@chromium.org, web-schedulin...@chromium.org
      Attention needed from Guohui Deng

      Scott Haseley added 3 comments

      File third_party/blink/renderer/core/dom/events/event_target.cc
      Line 653, Patchset 4 (Latest): // Currently, resource timing context is only propagated on the main thread.
      Scott Haseley . unresolved

      This block and the one below should be flag-guarded.

      We'll want to check the overhead of this too on speedometer (with the feature enabled. I sometimes create a separate dependent branch enabling the feature to test this). I'm not sure if you have access to pinpoint, but the instructions are https://chromium.googlesource.com/chromium/src/+/main/docs/speed/perf_trybots.md (although it's speedometer3 now, not too). I'm happy to kick off a job for this too. I _think_ this should be okay, but we'll want to evaluate.

      Line 1091, Patchset 4 (Latest): std::optional<scheduler::TaskAttributionTracker::TaskScope>
      Scott Haseley . unresolved

      Note: This is a divergence from task attribution, and I'm not sure if you want that or not in all cases.

      This implements "registration" semantics, where context is captured during at event listener registration time. The alternative is "Dispatch" semantics follow execution flow, e.g. an event fires async because an a certain API was called, e.g. XHR. Sometimes these are the same, sometimes they're different. (see also https://github.com/tc39/proposal-async-context/blob/master/WEB-INTEGRATION.md#events)

      Task Attribution has instrumented some events using dispatch context, e.g. XHR events, some filesystem events, postMessage/MessageChannel, etc. In those cases, you might be overwriting the context with a different value, and I'm not sure if that's what you'll want or not. One option is to use your approach as a fallback if the context isn't set.

      Unfortunately how AsyncContext (and ultimately Task Attribution) will handle events is a WIP and a bit of a moving target, so I'm not sure how you'll want to handle that or what best fits this API. This is a bit of a unique situation (for soft navs too) where we're building a feature on top of something else that isn't stable, and could be worth discussion more offline about timelines, etc.

      File third_party/blink/renderer/core/dom/events/registered_event_listener.h
      Line 40, Patchset 4 (Latest):class RegisteredEventListener final
      Scott Haseley . unresolved

      Is this needed for `NativeEventListener` as well as JS event listeners? Feels like `JSBasedEventListener` or `JSEventListener` might be a better place for this?

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Guohui Deng
      Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement is not satisfiedCode-Owners
        • requirement is not satisfiedCode-Review
        • requirement is not satisfiedNo-Unresolved-Comments
        • requirement is not 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: I1a9ade6c7b5ff27473e720181140b064f31a4ba7
        Gerrit-Change-Number: 7520726
        Gerrit-PatchSet: 4
        Gerrit-Owner: Guohui Deng <guohu...@microsoft.com>
        Gerrit-Reviewer: Guohui Deng <guohu...@microsoft.com>
        Gerrit-Reviewer: Scott Haseley <shas...@chromium.org>
        Gerrit-CC: Menard, Alexis <alexis...@intel.com>
        Gerrit-CC: Nate Chapin <jap...@chromium.org>
        Gerrit-CC: Olga Gerchikov <gerc...@microsoft.com>
        Gerrit-Attention: Guohui Deng <guohu...@microsoft.com>
        Gerrit-Comment-Date: Wed, 04 Feb 2026 20:09:09 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Scott Haseley (Gerrit)

        unread,
        Feb 4, 2026, 3:09:43 PMFeb 4
        to Guohui Deng, Michal Mocny, Chromium LUCI CQ, Menard, Alexis, chromium...@chromium.org, Olga Gerchikov, Nate Chapin, blink-revie...@chromium.org, blink-re...@chromium.org, blink-re...@chromium.org, blink-revi...@chromium.org, blink-...@chromium.org, chikamu...@chromium.org, dtapuska+...@chromium.org, gavinp...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, loading...@chromium.org, scheduler-...@chromium.org, web-schedulin...@chromium.org
        Attention needed from Guohui Deng

        Scott Haseley added 1 comment

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

        cc: Michal also

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Guohui Deng
        Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement is not satisfiedCode-Owners
        • requirement is not satisfiedCode-Review
        • requirement is not satisfiedNo-Unresolved-Comments
        • requirement is not 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: I1a9ade6c7b5ff27473e720181140b064f31a4ba7
        Gerrit-Change-Number: 7520726
        Gerrit-PatchSet: 4
        Gerrit-Owner: Guohui Deng <guohu...@microsoft.com>
        Gerrit-Reviewer: Guohui Deng <guohu...@microsoft.com>
        Gerrit-Reviewer: Scott Haseley <shas...@chromium.org>
        Gerrit-CC: Menard, Alexis <alexis...@intel.com>
        Gerrit-CC: Michal Mocny <mmo...@chromium.org>
        Gerrit-CC: Nate Chapin <jap...@chromium.org>
        Gerrit-CC: Olga Gerchikov <gerc...@microsoft.com>
        Gerrit-Attention: Guohui Deng <guohu...@microsoft.com>
        Gerrit-Comment-Date: Wed, 04 Feb 2026 20:09:32 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Guohui Deng (Gerrit)

        unread,
        Feb 6, 2026, 4:00:00 PM (14 days ago) Feb 6
        to Kentaro Hara, Raphael Kubo da Costa, AyeAye, Michal Mocny, Scott Haseley, Chromium LUCI CQ, Menard, Alexis, chromium...@chromium.org, Olga Gerchikov, Nate Chapin, blink-revie...@chromium.org, blink-revie...@chromium.org, blink-re...@chromium.org, blink-re...@chromium.org, blink-revi...@chromium.org, blink-...@chromium.org, chikamu...@chromium.org, dtapuska+...@chromium.org, gavinp...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, loading...@chromium.org, scheduler-...@chromium.org, web-schedulin...@chromium.org
        Attention needed from Scott Haseley

        Guohui Deng added 3 comments

        File third_party/blink/renderer/core/dom/events/event_target.cc
        Line 653, Patchset 4: // Currently, resource timing context is only propagated on the main thread.
        Scott Haseley . resolved

        This block and the one below should be flag-guarded.

        We'll want to check the overhead of this too on speedometer (with the feature enabled. I sometimes create a separate dependent branch enabling the feature to test this). I'm not sure if you have access to pinpoint, but the instructions are https://chromium.googlesource.com/chromium/src/+/main/docs/speed/perf_trybots.md (although it's speedometer3 now, not too). I'm happy to kick off a job for this too. I _think_ this should be okay, but we'll want to evaluate.

        Guohui Deng

        Added flag guard. Sorry I forgot this again and thank you for your patience!

        Regarding the test: I can sign in and open the "run a try job" page so it looks like I have access! I will try to start the test later and if I run into problems I will ask for help. 😊

        Line 1091, Patchset 4: std::optional<scheduler::TaskAttributionTracker::TaskScope>
        Scott Haseley . unresolved

        Note: This is a divergence from task attribution, and I'm not sure if you want that or not in all cases.

        This implements "registration" semantics, where context is captured during at event listener registration time. The alternative is "Dispatch" semantics follow execution flow, e.g. an event fires async because an a certain API was called, e.g. XHR. Sometimes these are the same, sometimes they're different. (see also https://github.com/tc39/proposal-async-context/blob/master/WEB-INTEGRATION.md#events)

        Task Attribution has instrumented some events using dispatch context, e.g. XHR events, some filesystem events, postMessage/MessageChannel, etc. In those cases, you might be overwriting the context with a different value, and I'm not sure if that's what you'll want or not. One option is to use your approach as a fallback if the context isn't set.

        Unfortunately how AsyncContext (and ultimately Task Attribution) will handle events is a WIP and a bit of a moving target, so I'm not sure how you'll want to handle that or what best fits this API. This is a bit of a unique situation (for soft navs too) where we're building a feature on top of something else that isn't stable, and could be worth discussion more offline about timelines, etc.

        Guohui Deng

        From the perspective of "initiator url" I much prefer propagating the "resource timing context" from script that sets up the handler, i.e., take the "context" at the "registration" (more details below). When I saw the planning of the AsyncContext I noticed they prefer propagating the "variables" along the script execution flow -- which makes sense for other applications of TaskAttribution(like soft navigation) and AsyncContext. I vaguely remembered I asked if asyncContext can accommodate this different propagating flow, and the answer was "yes with some extra work". So I hope this won't cause too much pain for you guys. If it adds too much work I will be happy to change. (maybe speaking with WebPerf WG too)

        //////////////
        The reason I prefer the current approach is that, the typical use case is that we "predict" the next resource fetch by previous resource that is fetched. In addition, the prediction is never reliable, because of the limitations that we have. (one noticeable limitation is that we can only pick up one script, instead of both the script that caused the event and the script that registered the handler). I think it's advantageous to report only "the script that registers the handler" because:

        a) "registration script" would be expected to happen sooner. Typically, once the handler is registered, we can expect that the resource fetched in the handler can happen at any time.
        b) "registration script" always exists. Events can result from user (and I would guess this is not a small portion) so that no "initiator" caused the event. Even if we make a "fallback" to report the "registering", then more different "initiator"s can be reported for the same resource and make the prediction more difficult. In addition, I prefer simpler definition.

        What do you think?

        File third_party/blink/renderer/core/dom/events/registered_event_listener.h
        Line 40, Patchset 4:class RegisteredEventListener final
        Scott Haseley . resolved

        Is this needed for `NativeEventListener` as well as JS event listeners? Feels like `JSBasedEventListener` or `JSEventListener` might be a better place for this?

        Guohui Deng

        It should be indeed in `JSBasedEventListener`. I made changes accordingly.

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Scott Haseley
        Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement is not satisfiedCode-Owners
        • requirement is not satisfiedCode-Review
        • requirement is not satisfiedNo-Unresolved-Comments
        • requirement is not 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: I1a9ade6c7b5ff27473e720181140b064f31a4ba7
        Gerrit-Change-Number: 7520726
        Gerrit-PatchSet: 5
        Gerrit-Owner: Guohui Deng <guohu...@microsoft.com>
        Gerrit-Reviewer: Guohui Deng <guohu...@microsoft.com>
        Gerrit-Reviewer: Scott Haseley <shas...@chromium.org>
        Gerrit-CC: Kentaro Hara <har...@chromium.org>
        Gerrit-CC: Menard, Alexis <alexis...@intel.com>
        Gerrit-CC: Michal Mocny <mmo...@chromium.org>
        Gerrit-CC: Nate Chapin <jap...@chromium.org>
        Gerrit-CC: Olga Gerchikov <gerc...@microsoft.com>
        Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
        Gerrit-Attention: Scott Haseley <shas...@chromium.org>
        Gerrit-Comment-Date: Fri, 06 Feb 2026 20:59:49 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        Comment-In-Reply-To: Scott Haseley <shas...@chromium.org>
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Scott Haseley (Gerrit)

        unread,
        Feb 6, 2026, 4:54:58 PM (14 days ago) Feb 6
        to Guohui Deng, Kentaro Hara, Raphael Kubo da Costa, AyeAye, Michal Mocny, Chromium LUCI CQ, Menard, Alexis, chromium...@chromium.org, Olga Gerchikov, Nate Chapin, blink-revie...@chromium.org, blink-revie...@chromium.org, blink-re...@chromium.org, blink-re...@chromium.org, blink-revi...@chromium.org, blink-...@chromium.org, chikamu...@chromium.org, dtapuska+...@chromium.org, gavinp...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, loading...@chromium.org, scheduler-...@chromium.org, web-schedulin...@chromium.org
        Attention needed from Guohui Deng

        Scott Haseley added 3 comments

        File third_party/blink/renderer/core/dom/events/event_target.cc
        Line 653, Patchset 5 (Latest): if (RuntimeEnabledFeatures::ResourceTimingInitiatorEnabled()) {
        Scott Haseley . unresolved

        Can all of this move into JSBasedEventListener, i.e. the constructor?

        Aside from improving encapsulation, I think it might be required anyway for event attributes, e.g. `onfoo` for event "foo", when changing the listener. E.g.

        ```
        document.onfoo = listener1;

        // ... sometime later ...

        document.onfoo = listener2;
        ```

        In that case, IIUC, we update the callback in the existing registered listener and don't go down this code path. https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/dom/events/event_target.cc;l=822-825;drc=976a71ef2a509d4391d814b52b9f4700fdf35789;bpv=1;bpt=1

        Line 1091, Patchset 4: std::optional<scheduler::TaskAttributionTracker::TaskScope>
        Scott Haseley . unresolved

        Note: This is a divergence from task attribution, and I'm not sure if you want that or not in all cases.

        This implements "registration" semantics, where context is captured during at event listener registration time. The alternative is "Dispatch" semantics follow execution flow, e.g. an event fires async because an a certain API was called, e.g. XHR. Sometimes these are the same, sometimes they're different. (see also https://github.com/tc39/proposal-async-context/blob/master/WEB-INTEGRATION.md#events)

        Task Attribution has instrumented some events using dispatch context, e.g. XHR events, some filesystem events, postMessage/MessageChannel, etc. In those cases, you might be overwriting the context with a different value, and I'm not sure if that's what you'll want or not. One option is to use your approach as a fallback if the context isn't set.

        Unfortunately how AsyncContext (and ultimately Task Attribution) will handle events is a WIP and a bit of a moving target, so I'm not sure how you'll want to handle that or what best fits this API. This is a bit of a unique situation (for soft navs too) where we're building a feature on top of something else that isn't stable, and could be worth discussion more offline about timelines, etc.

        Guohui Deng

        From the perspective of "initiator url" I much prefer propagating the "resource timing context" from script that sets up the handler, i.e., take the "context" at the "registration" (more details below). When I saw the planning of the AsyncContext I noticed they prefer propagating the "variables" along the script execution flow -- which makes sense for other applications of TaskAttribution(like soft navigation) and AsyncContext. I vaguely remembered I asked if asyncContext can accommodate this different propagating flow, and the answer was "yes with some extra work". So I hope this won't cause too much pain for you guys. If it adds too much work I will be happy to change. (maybe speaking with WebPerf WG too)

        //////////////
        The reason I prefer the current approach is that, the typical use case is that we "predict" the next resource fetch by previous resource that is fetched. In addition, the prediction is never reliable, because of the limitations that we have. (one noticeable limitation is that we can only pick up one script, instead of both the script that caused the event and the script that registered the handler). I think it's advantageous to report only "the script that registers the handler" because:

        a) "registration script" would be expected to happen sooner. Typically, once the handler is registered, we can expect that the resource fetched in the handler can happen at any time.
        b) "registration script" always exists. Events can result from user (and I would guess this is not a small portion) so that no "initiator" caused the event. Even if we make a "fallback" to report the "registering", then more different "initiator"s can be reported for the same resource and make the prediction more difficult. In addition, I prefer simpler definition.

        What do you think?

        Scott Haseley

        w.r.t extra work, it's probably fine -- but long term it might depend on how AsyncContext gets implemented. Right now, we're setting up the context (for propagation) before dispatching the event, and you're hooking into a point after that, so it works. If we change this to also hook into events, we'll just have to make sure we get the ordering right.

        ---

        I don't have a strong opinion on the feature itself, just want to make sure it's been thought through. But this should probably be documented in the explainer and discussed at WebPerfWG at some point (doesn't block this IMO).

        Line 1102, Patchset 5 (Latest): if (RuntimeEnabledFeatures::ResourceTimingInitiatorEnabled()) {
        Scott Haseley . unresolved

        Similarly here, can this move into the js_based_event_listener? There's an `InvokeInternal()` method that runs to actually invoke the listener, and you could hook in there. You might need to create a helper method in the common base class to create the TaskScope.

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Guohui Deng
        Gerrit-Attention: Guohui Deng <guohu...@microsoft.com>
        Gerrit-Comment-Date: Fri, 06 Feb 2026 21:54:50 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        Comment-In-Reply-To: Guohui Deng <guohu...@microsoft.com>
        Comment-In-Reply-To: Scott Haseley <shas...@chromium.org>
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Guohui Deng (Gerrit)

        unread,
        Feb 10, 2026, 12:06:36 PM (10 days ago) Feb 10
        to Kentaro Hara, Raphael Kubo da Costa, AyeAye, Michal Mocny, Scott Haseley, Chromium LUCI CQ, Menard, Alexis, chromium...@chromium.org, Olga Gerchikov, Nate Chapin, blink-revie...@chromium.org, blink-revie...@chromium.org, blink-revie...@chromium.org, blink-re...@chromium.org, blink-re...@chromium.org, blink-revi...@chromium.org, blink-...@chromium.org, chikamu...@chromium.org, dtapuska+...@chromium.org, gavinp...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, loading...@chromium.org, scheduler-...@chromium.org, web-schedulin...@chromium.org
        Attention needed from Scott Haseley

        Guohui Deng added 3 comments

        File third_party/blink/renderer/core/dom/events/event_target.cc
        Line 653, Patchset 5: if (RuntimeEnabledFeatures::ResourceTimingInitiatorEnabled()) {
        Scott Haseley . resolved

        Can all of this move into JSBasedEventListener, i.e. the constructor?

        Aside from improving encapsulation, I think it might be required anyway for event attributes, e.g. `onfoo` for event "foo", when changing the listener. E.g.

        ```
        document.onfoo = listener1;

        // ... sometime later ...

        document.onfoo = listener2;
        ```

        In that case, IIUC, we update the callback in the existing registered listener and don't go down this code path. https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/dom/events/event_target.cc;l=822-825;drc=976a71ef2a509d4391d814b52b9f4700fdf35789;bpv=1;bpt=1

        Guohui Deng

        Done

        Line 1091, Patchset 4: std::optional<scheduler::TaskAttributionTracker::TaskScope>
        Scott Haseley . resolved

        Note: This is a divergence from task attribution, and I'm not sure if you want that or not in all cases.

        This implements "registration" semantics, where context is captured during at event listener registration time. The alternative is "Dispatch" semantics follow execution flow, e.g. an event fires async because an a certain API was called, e.g. XHR. Sometimes these are the same, sometimes they're different. (see also https://github.com/tc39/proposal-async-context/blob/master/WEB-INTEGRATION.md#events)

        Task Attribution has instrumented some events using dispatch context, e.g. XHR events, some filesystem events, postMessage/MessageChannel, etc. In those cases, you might be overwriting the context with a different value, and I'm not sure if that's what you'll want or not. One option is to use your approach as a fallback if the context isn't set.

        Unfortunately how AsyncContext (and ultimately Task Attribution) will handle events is a WIP and a bit of a moving target, so I'm not sure how you'll want to handle that or what best fits this API. This is a bit of a unique situation (for soft navs too) where we're building a feature on top of something else that isn't stable, and could be worth discussion more offline about timelines, etc.

        Guohui Deng

        From the perspective of "initiator url" I much prefer propagating the "resource timing context" from script that sets up the handler, i.e., take the "context" at the "registration" (more details below). When I saw the planning of the AsyncContext I noticed they prefer propagating the "variables" along the script execution flow -- which makes sense for other applications of TaskAttribution(like soft navigation) and AsyncContext. I vaguely remembered I asked if asyncContext can accommodate this different propagating flow, and the answer was "yes with some extra work". So I hope this won't cause too much pain for you guys. If it adds too much work I will be happy to change. (maybe speaking with WebPerf WG too)

        //////////////
        The reason I prefer the current approach is that, the typical use case is that we "predict" the next resource fetch by previous resource that is fetched. In addition, the prediction is never reliable, because of the limitations that we have. (one noticeable limitation is that we can only pick up one script, instead of both the script that caused the event and the script that registered the handler). I think it's advantageous to report only "the script that registers the handler" because:

        a) "registration script" would be expected to happen sooner. Typically, once the handler is registered, we can expect that the resource fetched in the handler can happen at any time.
        b) "registration script" always exists. Events can result from user (and I would guess this is not a small portion) so that no "initiator" caused the event. Even if we make a "fallback" to report the "registering", then more different "initiator"s can be reported for the same resource and make the prediction more difficult. In addition, I prefer simpler definition.

        What do you think?

        Scott Haseley

        w.r.t extra work, it's probably fine -- but long term it might depend on how AsyncContext gets implemented. Right now, we're setting up the context (for propagation) before dispatching the event, and you're hooking into a point after that, so it works. If we change this to also hook into events, we'll just have to make sure we get the ordering right.

        ---

        I don't have a strong opinion on the feature itself, just want to make sure it's been thought through. But this should probably be documented in the explainer and discussed at WebPerfWG at some point (doesn't block this IMO).

        Guohui Deng

        got it. I will take care of these. Thanks.

        Line 1102, Patchset 5: if (RuntimeEnabledFeatures::ResourceTimingInitiatorEnabled()) {
        Scott Haseley . resolved

        Similarly here, can this move into the js_based_event_listener? There's an `InvokeInternal()` method that runs to actually invoke the listener, and you could hook in there. You might need to create a helper method in the common base class to create the TaskScope.

        Guohui Deng

        Done. As discussed, I moved the code to be besides "InvokeInternal()" and made additional tests for this.

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Scott Haseley
        Submit Requirements:
          • requirement satisfiedCode-Coverage
          • requirement is not satisfiedCode-Owners
          • requirement is not satisfiedCode-Review
          • requirement is not 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: I1a9ade6c7b5ff27473e720181140b064f31a4ba7
          Gerrit-Change-Number: 7520726
          Gerrit-PatchSet: 6
          Gerrit-Owner: Guohui Deng <guohu...@microsoft.com>
          Gerrit-Reviewer: Guohui Deng <guohu...@microsoft.com>
          Gerrit-Reviewer: Scott Haseley <shas...@chromium.org>
          Gerrit-CC: Kentaro Hara <har...@chromium.org>
          Gerrit-CC: Menard, Alexis <alexis...@intel.com>
          Gerrit-CC: Michal Mocny <mmo...@chromium.org>
          Gerrit-CC: Nate Chapin <jap...@chromium.org>
          Gerrit-CC: Olga Gerchikov <gerc...@microsoft.com>
          Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
          Gerrit-Attention: Scott Haseley <shas...@chromium.org>
          Gerrit-Comment-Date: Tue, 10 Feb 2026 17:06:26 +0000
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Scott Haseley (Gerrit)

          unread,
          Feb 11, 2026, 1:54:00 PM (9 days ago) Feb 11
          to Guohui Deng, Kentaro Hara, Raphael Kubo da Costa, AyeAye, Michal Mocny, Chromium LUCI CQ, Menard, Alexis, chromium...@chromium.org, Olga Gerchikov, Nate Chapin, blink-revie...@chromium.org, blink-revie...@chromium.org, blink-revie...@chromium.org, blink-re...@chromium.org, blink-re...@chromium.org, blink-revi...@chromium.org, blink-...@chromium.org, chikamu...@chromium.org, dtapuska+...@chromium.org, gavinp...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, loading...@chromium.org, scheduler-...@chromium.org, web-schedulin...@chromium.org
          Attention needed from Guohui Deng

          Scott Haseley added 7 comments

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

          I think this looks good % nits

          File third_party/blink/renderer/bindings/core/v8/js_based_event_listener.cc
          Line 31, Patchset 6 (Latest): if (RuntimeEnabledFeatures::ResourceTimingInitiatorEnabled()) {
          Scott Haseley . unresolved

          Maybe use existing `IsMainThread()` block and simplify a bit:

          ```
          if (IsMainThread()) {
          ...
          if (RuntimeEnabledFeatures::ResourceTimingInitiatorEnabled()) {
          if (v8::Isolate* isolate =
          ResourceInitiatorHelper::GetIsolateIfRunningScriptOnMainThread()) {
          resource_timing_context_ = ...
          }
          }
          }
          ```
          Line 185, Patchset 6 (Latest): std::optional<scheduler::TaskAttributionTracker::TaskScope>
          Scott Haseley . unresolved

          nit: I'd suggest moving this above the Step 10 comment because that is intended to match the spec and this isn't specced yet. And maybe add a comment above it pointing to the explainer.

          File third_party/blink/web_tests/external/wpt/resource-timing/tentative/initiator-url/event-handler-overwritten.html
          Line 7, Patchset 6 (Latest):
          Scott Haseley . unresolved

          nit: remove extra line (sorry to be so nit-picky(!), but removing the random extra whitespace/lines would improve readability a bit).

          Line 13, Patchset 6 (Latest): correct initiator_url is reported after event handler is overwritten .
          Scott Haseley . unresolved
          nit
          ```suggestion
          correct initiator_url is reported after event handler is overwritten.
          ```
          Line 17, Patchset 6 (Latest):
          Scott Haseley . unresolved

          nit: remove leading whitespace line

          Line 33, Patchset 6 (Latest):
          Scott Haseley . unresolved

          nit: remove extra line

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Guohui Deng
          Submit Requirements:
            • requirement satisfiedCode-Coverage
            • requirement is not satisfiedCode-Owners
            • requirement is not satisfiedCode-Review
            • requirement is not satisfiedNo-Unresolved-Comments
            • requirement is not 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: I1a9ade6c7b5ff27473e720181140b064f31a4ba7
            Gerrit-Change-Number: 7520726
            Gerrit-PatchSet: 6
            Gerrit-Owner: Guohui Deng <guohu...@microsoft.com>
            Gerrit-Reviewer: Guohui Deng <guohu...@microsoft.com>
            Gerrit-Reviewer: Scott Haseley <shas...@chromium.org>
            Gerrit-CC: Kentaro Hara <har...@chromium.org>
            Gerrit-CC: Menard, Alexis <alexis...@intel.com>
            Gerrit-CC: Michal Mocny <mmo...@chromium.org>
            Gerrit-CC: Nate Chapin <jap...@chromium.org>
            Gerrit-CC: Olga Gerchikov <gerc...@microsoft.com>
            Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
            Gerrit-Attention: Guohui Deng <guohu...@microsoft.com>
            Gerrit-Comment-Date: Wed, 11 Feb 2026 18:53:50 +0000
            Gerrit-HasComments: Yes
            Gerrit-Has-Labels: No
            satisfied_requirement
            unsatisfied_requirement
            open
            diffy

            Guohui Deng (Gerrit)

            unread,
            Feb 11, 2026, 6:08:30 PM (9 days ago) Feb 11
            to Kentaro Hara, Raphael Kubo da Costa, AyeAye, Michal Mocny, Scott Haseley, Chromium LUCI CQ, Menard, Alexis, chromium...@chromium.org, Olga Gerchikov, Nate Chapin, blink-revie...@chromium.org, blink-revie...@chromium.org, blink-revie...@chromium.org, blink-re...@chromium.org, blink-re...@chromium.org, blink-revi...@chromium.org, blink-...@chromium.org, chikamu...@chromium.org, dtapuska+...@chromium.org, gavinp...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, loading...@chromium.org, scheduler-...@chromium.org, web-schedulin...@chromium.org
            Attention needed from Scott Haseley

            Guohui Deng added 6 comments

            File third_party/blink/renderer/bindings/core/v8/js_based_event_listener.cc
            Line 31, Patchset 6: if (RuntimeEnabledFeatures::ResourceTimingInitiatorEnabled()) {
            Scott Haseley . resolved

            Maybe use existing `IsMainThread()` block and simplify a bit:

            ```
            if (IsMainThread()) {
            ...
            if (RuntimeEnabledFeatures::ResourceTimingInitiatorEnabled()) {
            if (v8::Isolate* isolate =
            ResourceInitiatorHelper::GetIsolateIfRunningScriptOnMainThread()) {
            resource_timing_context_ = ...
            }
            }
            }
            ```
            Guohui Deng

            Done

            Line 185, Patchset 6: std::optional<scheduler::TaskAttributionTracker::TaskScope>
            Scott Haseley . resolved

            nit: I'd suggest moving this above the Step 10 comment because that is intended to match the spec and this isn't specced yet. And maybe add a comment above it pointing to the explainer.

            Guohui Deng

            Done

            File third_party/blink/web_tests/external/wpt/resource-timing/tentative/initiator-url/event-handler-overwritten.html
            Line 7, Patchset 6:
            Scott Haseley . resolved

            nit: remove extra line (sorry to be so nit-picky(!), but removing the random extra whitespace/lines would improve readability a bit).

            Guohui Deng

            I really appreciate you being meticulous catching these errors. I am sorry I have missed so many in this file -- I forgot (again) that `git cl format` doesn't correct wpt test files.

            Line 13, Patchset 6: correct initiator_url is reported after event handler is overwritten .
            Scott Haseley . resolved
            nit
            ```suggestion
            correct initiator_url is reported after event handler is overwritten.
            ```
            Guohui Deng

            Done

            Line 17, Patchset 6:
            Scott Haseley . resolved

            nit: remove leading whitespace line

            Guohui Deng

            Done

            Line 33, Patchset 6:
            Scott Haseley . resolved

            nit: remove extra line

            Guohui Deng

            Done

            Open in Gerrit

            Related details

            Attention is currently required from:
            • Scott Haseley
            Submit Requirements:
              • requirement satisfiedCode-Coverage
              • requirement is not satisfiedCode-Owners
              • requirement is not satisfiedCode-Review
              • requirement is not 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: I1a9ade6c7b5ff27473e720181140b064f31a4ba7
              Gerrit-Change-Number: 7520726
              Gerrit-PatchSet: 7
              Gerrit-Owner: Guohui Deng <guohu...@microsoft.com>
              Gerrit-Reviewer: Guohui Deng <guohu...@microsoft.com>
              Gerrit-Reviewer: Scott Haseley <shas...@chromium.org>
              Gerrit-CC: Kentaro Hara <har...@chromium.org>
              Gerrit-CC: Menard, Alexis <alexis...@intel.com>
              Gerrit-CC: Michal Mocny <mmo...@chromium.org>
              Gerrit-CC: Nate Chapin <jap...@chromium.org>
              Gerrit-CC: Olga Gerchikov <gerc...@microsoft.com>
              Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
              Gerrit-Attention: Scott Haseley <shas...@chromium.org>
              Gerrit-Comment-Date: Wed, 11 Feb 2026 23:08:22 +0000
              Gerrit-HasComments: Yes
              Gerrit-Has-Labels: No
              Comment-In-Reply-To: Scott Haseley <shas...@chromium.org>
              satisfied_requirement
              unsatisfied_requirement
              open
              diffy

              Scott Haseley (Gerrit)

              unread,
              Feb 12, 2026, 2:35:08 PM (8 days ago) Feb 12
              to Guohui Deng, Michal Mocny, Nate Chapin, Kentaro Hara, Raphael Kubo da Costa, AyeAye, Chromium LUCI CQ, Menard, Alexis, chromium...@chromium.org, Olga Gerchikov, blink-revie...@chromium.org, blink-revie...@chromium.org, blink-revie...@chromium.org, blink-re...@chromium.org, blink-re...@chromium.org, blink-revi...@chromium.org, blink-...@chromium.org, chikamu...@chromium.org, dtapuska+...@chromium.org, gavinp...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, loading...@chromium.org, scheduler-...@chromium.org, web-schedulin...@chromium.org
              Attention needed from Guohui Deng, Michal Mocny and Nate Chapin

              Scott Haseley voted and added 1 comment

              Votes added by Scott Haseley

              Code-Review+1

              1 comment

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

              LGTM.

              +Michal for second reviewer
              +Nate to double-check bindings

              Open in Gerrit

              Related details

              Attention is currently required from:
              • Guohui Deng
              • Michal Mocny
              • Nate Chapin
              Submit Requirements:
              • requirement satisfiedCode-Coverage
              • requirement satisfiedCode-Owners
              • requirement is not satisfiedCode-Review
              • requirement is not 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: I1a9ade6c7b5ff27473e720181140b064f31a4ba7
              Gerrit-Change-Number: 7520726
              Gerrit-PatchSet: 7
              Gerrit-Owner: Guohui Deng <guohu...@microsoft.com>
              Gerrit-Reviewer: Guohui Deng <guohu...@microsoft.com>
              Gerrit-Reviewer: Michal Mocny <mmo...@chromium.org>
              Gerrit-Reviewer: Nate Chapin <jap...@chromium.org>
              Gerrit-Reviewer: Scott Haseley <shas...@chromium.org>
              Gerrit-CC: Kentaro Hara <har...@chromium.org>
              Gerrit-CC: Menard, Alexis <alexis...@intel.com>
              Gerrit-CC: Olga Gerchikov <gerc...@microsoft.com>
              Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
              Gerrit-Attention: Guohui Deng <guohu...@microsoft.com>
              Gerrit-Attention: Nate Chapin <jap...@chromium.org>
              Gerrit-Attention: Michal Mocny <mmo...@chromium.org>
              Gerrit-Comment-Date: Thu, 12 Feb 2026 19:34:58 +0000
              Gerrit-HasComments: Yes
              Gerrit-Has-Labels: Yes
              satisfied_requirement
              unsatisfied_requirement
              open
              diffy

              Nate Chapin (Gerrit)

              unread,
              Feb 13, 2026, 1:43:06 PM (7 days ago) Feb 13
              to Guohui Deng, Michal Mocny, Scott Haseley, Kentaro Hara, Raphael Kubo da Costa, AyeAye, Chromium LUCI CQ, Menard, Alexis, chromium...@chromium.org, Olga Gerchikov, blink-revie...@chromium.org, blink-revie...@chromium.org, blink-revie...@chromium.org, blink-re...@chromium.org, blink-re...@chromium.org, blink-revi...@chromium.org, blink-...@chromium.org, chikamu...@chromium.org, dtapuska+...@chromium.org, gavinp...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, loading...@chromium.org, scheduler-...@chromium.org, web-schedulin...@chromium.org
              Attention needed from Guohui Deng and Michal Mocny

              Nate Chapin voted and added 1 comment

              Votes added by Nate Chapin

              Code-Review+1

              1 comment

              File third_party/blink/renderer/core/loader/resource_initiator_helper.h
              Line 20, Patchset 7 (Latest): static v8::Isolate* GetIsolateIfRunningScriptOnMainThread() {
              Nate Chapin . unresolved

              Optional cleanup: Seems like this should maybe be a private implementation detail of this class, and `GetResourceTimingContext` and `GetScriptInitiatorUrl` should be 0-arg?

              Open in Gerrit

              Related details

              Attention is currently required from:
              • Guohui Deng
              • 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: I1a9ade6c7b5ff27473e720181140b064f31a4ba7
                Gerrit-Change-Number: 7520726
                Gerrit-PatchSet: 7
                Gerrit-Owner: Guohui Deng <guohu...@microsoft.com>
                Gerrit-Reviewer: Guohui Deng <guohu...@microsoft.com>
                Gerrit-Reviewer: Michal Mocny <mmo...@chromium.org>
                Gerrit-Reviewer: Nate Chapin <jap...@chromium.org>
                Gerrit-Reviewer: Scott Haseley <shas...@chromium.org>
                Gerrit-CC: Kentaro Hara <har...@chromium.org>
                Gerrit-CC: Menard, Alexis <alexis...@intel.com>
                Gerrit-CC: Olga Gerchikov <gerc...@microsoft.com>
                Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
                Gerrit-Attention: Guohui Deng <guohu...@microsoft.com>
                Gerrit-Attention: Michal Mocny <mmo...@chromium.org>
                Gerrit-Comment-Date: Fri, 13 Feb 2026 18:42:55 +0000
                Gerrit-HasComments: Yes
                Gerrit-Has-Labels: Yes
                satisfied_requirement
                unsatisfied_requirement
                open
                diffy

                Guohui Deng (Gerrit)

                unread,
                Feb 17, 2026, 2:43:53 PM (3 days ago) Feb 17
                to Nate Chapin, Michal Mocny, Scott Haseley, Kentaro Hara, Raphael Kubo da Costa, AyeAye, Chromium LUCI CQ, Menard, Alexis, chromium...@chromium.org, Olga Gerchikov, blink-revie...@chromium.org, blink-revie...@chromium.org, blink-revie...@chromium.org, blink-re...@chromium.org, blink-re...@chromium.org, blink-revi...@chromium.org, blink-...@chromium.org, chikamu...@chromium.org, dtapuska+...@chromium.org, gavinp...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, loading...@chromium.org, scheduler-...@chromium.org, web-schedulin...@chromium.org
                Attention needed from Michal Mocny

                Guohui Deng added 1 comment

                File third_party/blink/renderer/core/loader/resource_initiator_helper.h
                Line 20, Patchset 7 (Latest): static v8::Isolate* GetIsolateIfRunningScriptOnMainThread() {
                Nate Chapin . resolved

                Optional cleanup: Seems like this should maybe be a private implementation detail of this class, and `GetResourceTimingContext` and `GetScriptInitiatorUrl` should be 0-arg?

                Guohui Deng

                The reason why this function needs to be exposed because we need to distinguish the following two:
                a) There is no isolate that's in context.
                b) There is an isolate that's in context but a valid `initiator-url` value is missing.

                For a), the `initiator-url` is the parent file that statically includes the current resource; for b) we report empty string as the `initiator-url` because we know it's fetched by Javascript code but due to implementation limit we are not able to report the value.

                Open in Gerrit

                Related details

                Attention is currently required from:
                • Michal Mocny
                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: I1a9ade6c7b5ff27473e720181140b064f31a4ba7
                  Gerrit-Change-Number: 7520726
                  Gerrit-PatchSet: 7
                  Gerrit-Owner: Guohui Deng <guohu...@microsoft.com>
                  Gerrit-Reviewer: Guohui Deng <guohu...@microsoft.com>
                  Gerrit-Reviewer: Michal Mocny <mmo...@chromium.org>
                  Gerrit-Reviewer: Nate Chapin <jap...@chromium.org>
                  Gerrit-Reviewer: Scott Haseley <shas...@chromium.org>
                  Gerrit-CC: Kentaro Hara <har...@chromium.org>
                  Gerrit-CC: Menard, Alexis <alexis...@intel.com>
                  Gerrit-CC: Olga Gerchikov <gerc...@microsoft.com>
                  Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
                  Gerrit-Attention: Michal Mocny <mmo...@chromium.org>
                  Gerrit-Comment-Date: Tue, 17 Feb 2026 19:43:46 +0000
                  Gerrit-HasComments: Yes
                  Gerrit-Has-Labels: No
                  Comment-In-Reply-To: Nate Chapin <jap...@chromium.org>
                  satisfied_requirement
                  open
                  diffy

                  Blink W3C Test Autoroller (Gerrit)

                  unread,
                  Feb 17, 2026, 2:55:42 PM (3 days ago) Feb 17
                  to Guohui Deng, Nate Chapin, Michal Mocny, Scott Haseley, Kentaro Hara, Raphael Kubo da Costa, AyeAye, Chromium LUCI CQ, Menard, Alexis, chromium...@chromium.org, Olga Gerchikov, blink-revie...@chromium.org, blink-revie...@chromium.org, blink-revie...@chromium.org, blink-re...@chromium.org, blink-re...@chromium.org, blink-revi...@chromium.org, blink-...@chromium.org, chikamu...@chromium.org, dtapuska+...@chromium.org, gavinp...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, loading...@chromium.org, scheduler-...@chromium.org, web-schedulin...@chromium.org
                  Attention needed from Michal Mocny

                  Message from Blink W3C Test Autoroller

                  Exportable changes to web-platform-tests were detected in this CL and a pull request in the upstream repo has been made: https://github.com/web-platform-tests/wpt/pull/57841.

                  When this CL lands, the bot will automatically merge the PR on GitHub if the required GitHub checks pass; otherwise, ecosystem-infra@ team will triage the failures and may contact you.

                  WPT Export docs:
                  https://chromium.googlesource.com/chromium/src/+/main/docs/testing/web_platform_tests.md#Automatic-export-process

                  Open in Gerrit

                  Related details

                  Attention is currently required from:
                  • Michal Mocny
                  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: I1a9ade6c7b5ff27473e720181140b064f31a4ba7
                  Gerrit-Change-Number: 7520726
                  Gerrit-PatchSet: 7
                  Gerrit-Owner: Guohui Deng <guohu...@microsoft.com>
                  Gerrit-Reviewer: Guohui Deng <guohu...@microsoft.com>
                  Gerrit-Reviewer: Michal Mocny <mmo...@chromium.org>
                  Gerrit-Reviewer: Nate Chapin <jap...@chromium.org>
                  Gerrit-Reviewer: Scott Haseley <shas...@chromium.org>
                  Gerrit-CC: Blink W3C Test Autoroller <blink-w3c-te...@chromium.org>
                  Gerrit-CC: Kentaro Hara <har...@chromium.org>
                  Gerrit-CC: Menard, Alexis <alexis...@intel.com>
                  Gerrit-CC: Olga Gerchikov <gerc...@microsoft.com>
                  Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
                  Gerrit-Attention: Michal Mocny <mmo...@chromium.org>
                  Gerrit-Comment-Date: Tue, 17 Feb 2026 19:55:35 +0000
                  Gerrit-HasComments: No
                  Gerrit-Has-Labels: No
                  satisfied_requirement
                  open
                  diffy

                  Michal Mocny (Gerrit)

                  unread,
                  Feb 18, 2026, 1:52:21 PM (2 days ago) Feb 18
                  to Guohui Deng, Blink W3C Test Autoroller, Nate Chapin, Scott Haseley, Kentaro Hara, Raphael Kubo da Costa, AyeAye, Chromium LUCI CQ, Menard, Alexis, chromium...@chromium.org, Olga Gerchikov, blink-revie...@chromium.org, blink-revie...@chromium.org, blink-revie...@chromium.org, blink-re...@chromium.org, blink-re...@chromium.org, blink-revi...@chromium.org, blink-...@chromium.org, chikamu...@chromium.org, dtapuska+...@chromium.org, gavinp...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, loading...@chromium.org, scheduler-...@chromium.org, web-schedulin...@chromium.org
                  Attention needed from Guohui Deng

                  Michal Mocny voted Code-Review+1

                  Code-Review+1
                  Open in Gerrit

                  Related details

                  Attention is currently required from:
                  • Guohui Deng
                  Gerrit-Attention: Guohui Deng <guohu...@microsoft.com>
                  Gerrit-Comment-Date: Wed, 18 Feb 2026 18:52:14 +0000
                  Gerrit-HasComments: No
                  Gerrit-Has-Labels: Yes
                  satisfied_requirement
                  open
                  diffy

                  Guohui Deng (Gerrit)

                  unread,
                  Feb 18, 2026, 1:59:24 PM (2 days ago) Feb 18
                  to Michal Mocny, Blink W3C Test Autoroller, Nate Chapin, Scott Haseley, Kentaro Hara, Raphael Kubo da Costa, AyeAye, Chromium LUCI CQ, Menard, Alexis, chromium...@chromium.org, Olga Gerchikov, blink-revie...@chromium.org, blink-revie...@chromium.org, blink-revie...@chromium.org, blink-re...@chromium.org, blink-re...@chromium.org, blink-revi...@chromium.org, blink-...@chromium.org, chikamu...@chromium.org, dtapuska+...@chromium.org, gavinp...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, loading...@chromium.org, scheduler-...@chromium.org, web-schedulin...@chromium.org

                  Guohui Deng voted Commit-Queue+2

                  Commit-Queue+2
                  Open in Gerrit

                  Related details

                  Attention set is empty
                  Gerrit-Comment-Date: Wed, 18 Feb 2026 18:59:16 +0000
                  Gerrit-HasComments: No
                  Gerrit-Has-Labels: Yes
                  satisfied_requirement
                  open
                  diffy

                  Chromium LUCI CQ (Gerrit)

                  unread,
                  Feb 18, 2026, 3:40:51 PM (2 days ago) Feb 18
                  to Guohui Deng, Michal Mocny, Blink W3C Test Autoroller, Nate Chapin, Scott Haseley, Kentaro Hara, Raphael Kubo da Costa, AyeAye, Menard, Alexis, chromium...@chromium.org, Olga Gerchikov, blink-revie...@chromium.org, blink-revie...@chromium.org, blink-revie...@chromium.org, blink-re...@chromium.org, blink-re...@chromium.org, blink-revi...@chromium.org, blink-...@chromium.org, chikamu...@chromium.org, dtapuska+...@chromium.org, gavinp...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, loading...@chromium.org, scheduler-...@chromium.org, web-schedulin...@chromium.org

                  Chromium LUCI CQ submitted the change

                  Change information

                  Commit message:
                  Report initiator url for resources fetched in event handler.

                  When the event handler is set, the ResourceTimingContext from the
                  setting script is stored in the RegisteredEventListener and later
                  dispatched along with the event handler.
                  Bug: 40919714
                  Change-Id: I1a9ade6c7b5ff27473e720181140b064f31a4ba7
                  Reviewed-by: Nate Chapin <jap...@chromium.org>
                  Commit-Queue: Guohui Deng <guohu...@microsoft.com>
                  Reviewed-by: Scott Haseley <shas...@chromium.org>
                  Reviewed-by: Michal Mocny <mmo...@chromium.org>
                  Cr-Commit-Position: refs/heads/main@{#1586633}
                  Files:
                  • M third_party/blink/renderer/bindings/core/v8/js_based_event_listener.cc
                  • M third_party/blink/renderer/bindings/core/v8/js_based_event_listener.h
                  • M third_party/blink/renderer/core/loader/resource_initiator_helper.h
                  • M third_party/blink/web_tests/TestExpectations
                  • M third_party/blink/web_tests/external/wpt/resource-timing/resources/loading-resource-lib.js
                  • A third_party/blink/web_tests/external/wpt/resource-timing/tentative/initiator-url/event-handler-overwritten.html
                  • M third_party/blink/web_tests/external/wpt/resource-timing/tentative/initiator-url/event-handler.html
                  Change size: M
                  Delta: 7 files changed, 97 insertions(+), 13 deletions(-)
                  Branch: refs/heads/main
                  Submit Requirements:
                  • requirement satisfiedCode-Review: +1 by Scott Haseley, +1 by Michal Mocny, +1 by Nate Chapin
                  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: I1a9ade6c7b5ff27473e720181140b064f31a4ba7
                  Gerrit-Change-Number: 7520726
                  Gerrit-PatchSet: 8
                  Gerrit-Owner: Guohui Deng <guohu...@microsoft.com>
                  Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
                  Gerrit-Reviewer: Guohui Deng <guohu...@microsoft.com>
                  Gerrit-Reviewer: Michal Mocny <mmo...@chromium.org>
                  Gerrit-Reviewer: Nate Chapin <jap...@chromium.org>
                  Gerrit-Reviewer: Scott Haseley <shas...@chromium.org>
                  Gerrit-CC: Blink W3C Test Autoroller <blink-w3c-te...@chromium.org>
                  open
                  diffy
                  satisfied_requirement

                  Blink W3C Test Autoroller (Gerrit)

                  unread,
                  Feb 18, 2026, 4:25:28 PM (2 days ago) Feb 18
                  to Guohui Deng, Chromium LUCI CQ, Michal Mocny, Nate Chapin, Scott Haseley, Kentaro Hara, Raphael Kubo da Costa, AyeAye, Menard, Alexis, chromium...@chromium.org, Olga Gerchikov, blink-revie...@chromium.org, blink-revie...@chromium.org, blink-revie...@chromium.org, blink-re...@chromium.org, blink-re...@chromium.org, blink-revi...@chromium.org, blink-...@chromium.org, chikamu...@chromium.org, dtapuska+...@chromium.org, gavinp...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, loading...@chromium.org, scheduler-...@chromium.org, web-schedulin...@chromium.org

                  Message from Blink W3C Test Autoroller

                  The WPT PR for this CL has been merged upstream! https://github.com/web-platform-tests/wpt/pull/57841

                  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: I1a9ade6c7b5ff27473e720181140b064f31a4ba7
                  Gerrit-Change-Number: 7520726
                  Gerrit-PatchSet: 8
                  Gerrit-Owner: Guohui Deng <guohu...@microsoft.com>
                  Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
                  Gerrit-Reviewer: Guohui Deng <guohu...@microsoft.com>
                  Gerrit-Reviewer: Michal Mocny <mmo...@chromium.org>
                  Gerrit-Reviewer: Nate Chapin <jap...@chromium.org>
                  Gerrit-Reviewer: Scott Haseley <shas...@chromium.org>
                  Gerrit-CC: Blink W3C Test Autoroller <blink-w3c-te...@chromium.org>
                  Gerrit-CC: Kentaro Hara <har...@chromium.org>
                  Gerrit-CC: Menard, Alexis <alexis...@intel.com>
                  Gerrit-CC: Olga Gerchikov <gerc...@microsoft.com>
                  Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
                  Gerrit-Comment-Date: Wed, 18 Feb 2026 21:25:22 +0000
                  Gerrit-HasComments: No
                  Gerrit-Has-Labels: No
                  satisfied_requirement
                  open
                  diffy

                  Guohui Deng (Gerrit)

                  unread,
                  Feb 19, 2026, 11:38:29 AM (yesterday) Feb 19
                  to Kentaro Hara, Raphael Kubo da Costa, Olga Gerchikov, Menard, Alexis, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, Nate Chapin, blink-revie...@chromium.org, blink-revie...@chromium.org, blink-revie...@chromium.org, jmedle...@chromium.org, chikamu...@chromium.org, scheduler-...@chromium.org, kinuko...@chromium.org, blink-re...@chromium.org, web-schedulin...@chromium.org, blink-re...@chromium.org, blink-revi...@chromium.org, blink-...@chromium.org, dtapuska+...@chromium.org, gavinp...@chromium.org, loading...@chromium.org

                  Guohui Deng abandoned this change.

                  View Change

                  Abandoned

                  Guohui Deng abandoned this change

                  Related details

                  Attention set is empty
                  Submit Requirements:
                  • requirement satisfiedCode-Coverage
                  • requirement is not satisfiedCode-Review
                  • requirement is not satisfiedReview-Enforcement
                  Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
                  Gerrit-MessageType: abandon
                  Gerrit-Project: chromium/src
                  Gerrit-Branch: main
                  Gerrit-Change-Id: I3bb31ba1c2b375098a6360c672116477b004967a
                  Gerrit-Change-Number: 7485195
                  Gerrit-PatchSet: 34
                  Gerrit-Owner: Guohui Deng <guohu...@microsoft.com>
                  Gerrit-Reviewer: Guohui Deng <guohu...@microsoft.com>
                  Gerrit-CC: Kentaro Hara <har...@chromium.org>
                  Gerrit-CC: Menard, Alexis <alexis...@intel.com>
                  Gerrit-CC: Nate Chapin <jap...@chromium.org>
                  satisfied_requirement
                  unsatisfied_requirement
                  open
                  diffy
                  Reply all
                  Reply to author
                  Forward
                  0 new messages