[event-timing] Simplify Event Timing entry tracking during RAII stack [chromium/src : main]

0 views
Skip to first unread message

Michal Mocny (Gerrit)

unread,
Feb 13, 2026, 6:19:48 PM (9 days ago) Feb 13
to Scott Haseley, Johannes Henkel, Chromium LUCI CQ, chromium...@chromium.org, blink-...@chromium.org, core-timi...@chromium.org, speed-metrics...@chromium.org
Attention needed from Johannes Henkel and Scott Haseley

New activity on the change

Open in Gerrit

Related details

Attention is currently required from:
  • Johannes Henkel
  • Scott Haseley
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: I4612270e4760a0286668a31bc97e299ea8cbc16f
Gerrit-Change-Number: 7571910
Gerrit-PatchSet: 2
Gerrit-Owner: Michal Mocny <mmo...@chromium.org>
Gerrit-Reviewer: Johannes Henkel <joha...@chromium.org>
Gerrit-Reviewer: Michal Mocny <mmo...@chromium.org>
Gerrit-Reviewer: Scott Haseley <shas...@chromium.org>
Gerrit-Attention: Johannes Henkel <joha...@chromium.org>
Gerrit-Attention: Scott Haseley <shas...@chromium.org>
Gerrit-Comment-Date: Fri, 13 Feb 2026 23:19:44 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Johannes Henkel (Gerrit)

unread,
Feb 13, 2026, 6:46:48 PM (8 days ago) Feb 13
to Michal Mocny, Scott Haseley, Chromium LUCI CQ, chromium...@chromium.org, blink-...@chromium.org, core-timi...@chromium.org, speed-metrics...@chromium.org
Attention needed from Michal Mocny and Scott Haseley

Johannes Henkel added 4 comments

Patchset-level comments
File-level comment, Patchset 4 (Latest):
Johannes Henkel . resolved

I'll come to my computer later tonight to read the relevant portion of window_performance.cc quite a bit more carefully to understand this in detail, but figured I'd scribble what I have now. :-)

File third_party/blink/renderer/core/timing/event_timing.cc
Line 124, Patchset 4 (Latest): // event_ might potentially be null if this is std::move()-ed.
Johannes Henkel . unresolved

This pre-existing comment feels a little scary, is this an indication that stuff gets processed out of the expected RAII order? Could it be that the new, more efficient code is more reliant on the order than the original (the search in the other file that you're getting rid of, basically)? (speculating / ignore as you see fit please, I think I don't understand it well enough yet to really tell)

File third_party/blink/renderer/core/timing/window_performance.cc
Line 661, Patchset 4 (Latest):
Johannes Henkel . unresolved

Maybe a check of sorts to guard against underflow in the next line?
E.g. CHECK(entry_nesting_level_ > 0);

Line 697, Patchset 4 (Latest): DomWindow()->GetFrame()->GetChromeClient().NotifyPresentationTime(
Johannes Henkel . unresolved

This is still in the same method, but I think you removed the check from l. 651 (base version) so it could crash? Or is checking for |entry| sufficient to prevent a null dereference?

Open in Gerrit

Related details

Attention is currently required from:
  • Michal Mocny
  • Scott Haseley
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement 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: I4612270e4760a0286668a31bc97e299ea8cbc16f
    Gerrit-Change-Number: 7571910
    Gerrit-PatchSet: 4
    Gerrit-Owner: Michal Mocny <mmo...@chromium.org>
    Gerrit-Reviewer: Johannes Henkel <joha...@chromium.org>
    Gerrit-Reviewer: Michal Mocny <mmo...@chromium.org>
    Gerrit-Reviewer: Scott Haseley <shas...@chromium.org>
    Gerrit-Attention: Scott Haseley <shas...@chromium.org>
    Gerrit-Attention: Michal Mocny <mmo...@chromium.org>
    Gerrit-Comment-Date: Fri, 13 Feb 2026 23:46:42 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Scott Haseley (Gerrit)

    unread,
    Feb 13, 2026, 6:48:00 PM (8 days ago) Feb 13
    to Michal Mocny, Johannes Henkel, Chromium LUCI CQ, chromium...@chromium.org, blink-...@chromium.org, core-timi...@chromium.org, speed-metrics...@chromium.org
    Attention needed from Michal Mocny

    Scott Haseley added 3 comments

    Patchset-level comments
    Scott Haseley . resolved

    Mostly LG. This is a lot cleaner.

    File third_party/blink/renderer/core/timing/event_timing.h
    Line 61, Patchset 4 (Latest): Persistent<PerformanceEventTiming> entry_;
    Scott Haseley . unresolved

    This (and the others) really should be stored as raw pointers since this is stack allocated. I think for `event_` that would require clearing state on move() though.

    File third_party/blink/renderer/core/timing/window_performance.cc
    Line 651, Patchset 4 (Parent): if (!DomWindow() || !DomWindow()->GetFrame()) {
    Scott Haseley . unresolved

    What would happen if running the event handler detaches the window?

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Michal Mocny
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement 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: I4612270e4760a0286668a31bc97e299ea8cbc16f
    Gerrit-Change-Number: 7571910
    Gerrit-PatchSet: 4
    Gerrit-Owner: Michal Mocny <mmo...@chromium.org>
    Gerrit-Reviewer: Johannes Henkel <joha...@chromium.org>
    Gerrit-Reviewer: Michal Mocny <mmo...@chromium.org>
    Gerrit-Reviewer: Scott Haseley <shas...@chromium.org>
    Gerrit-Attention: Michal Mocny <mmo...@chromium.org>
    Gerrit-Comment-Date: Fri, 13 Feb 2026 23:47:54 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Michal Mocny (Gerrit)

    unread,
    Feb 13, 2026, 6:50:18 PM (8 days ago) Feb 13
    to Scott Haseley, Johannes Henkel, Chromium LUCI CQ, chromium...@chromium.org, blink-...@chromium.org, core-timi...@chromium.org, speed-metrics...@chromium.org
    Attention needed from Johannes Henkel

    Michal Mocny voted and added 2 comments

    Votes added by Michal Mocny

    Commit-Queue+1

    2 comments

    File third_party/blink/renderer/core/timing/event_timing.cc
    Line 124, Patchset 4 (Latest): // event_ might potentially be null if this is std::move()-ed.
    Johannes Henkel . resolved

    This pre-existing comment feels a little scary, is this an indication that stuff gets processed out of the expected RAII order? Could it be that the new, more efficient code is more reliant on the order than the original (the search in the other file that you're getting rid of, basically)? (speculating / ignore as you see fit please, I think I don't understand it well enough yet to really tell)

    Michal Mocny

    I dont actually think this ever does or could get moved. But I dont want to remove this without understanding the historical context.

    File third_party/blink/renderer/core/timing/window_performance.cc
    Line 697, Patchset 4 (Latest): DomWindow()->GetFrame()->GetChromeClient().NotifyPresentationTime(
    Johannes Henkel . unresolved

    This is still in the same method, but I think you removed the check from l. 651 (base version) so it could crash? Or is checking for |entry| sufficient to prevent a null dereference?

    Michal Mocny

    I thought it was, but I will add it back to be extra careful.

    In general I wouldn't think this could change in the middle of event dispatch (and still have the event finish dispatch), but I've been surprised before! (i.e. devtools debugging pauses or something)

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Johannes Henkel
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement 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: I4612270e4760a0286668a31bc97e299ea8cbc16f
    Gerrit-Change-Number: 7571910
    Gerrit-PatchSet: 4
    Gerrit-Owner: Michal Mocny <mmo...@chromium.org>
    Gerrit-Reviewer: Johannes Henkel <joha...@chromium.org>
    Gerrit-Reviewer: Michal Mocny <mmo...@chromium.org>
    Gerrit-Reviewer: Scott Haseley <shas...@chromium.org>
    Gerrit-Attention: Johannes Henkel <joha...@chromium.org>
    Gerrit-Comment-Date: Fri, 13 Feb 2026 23:50:13 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    Comment-In-Reply-To: Johannes Henkel <joha...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Scott Haseley (Gerrit)

    unread,
    Feb 13, 2026, 6:51:21 PM (8 days ago) Feb 13
    to Michal Mocny, Johannes Henkel, Chromium LUCI CQ, chromium...@chromium.org, blink-...@chromium.org, core-timi...@chromium.org, speed-metrics...@chromium.org
    Attention needed from Johannes Henkel

    Scott Haseley added 1 comment

    File third_party/blink/renderer/core/timing/event_timing.cc
    Line 124, Patchset 4 (Latest): // event_ might potentially be null if this is std::move()-ed.
    Johannes Henkel . unresolved

    This pre-existing comment feels a little scary, is this an indication that stuff gets processed out of the expected RAII order? Could it be that the new, more efficient code is more reliant on the order than the original (the search in the other file that you're getting rid of, basically)? (speculating / ignore as you see fit please, I think I don't understand it well enough yet to really tell)

    Scott Haseley

    No I think it's just a product of this being moveable (during creation). This is common for moveable RAII classes, and you'd have to make it non-moveable to avoid this. (btw it should be "this will be null if this has been moved", not potentially).

    Gerrit-Comment-Date: Fri, 13 Feb 2026 23:51:15 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Johannes Henkel <joha...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Scott Haseley (Gerrit)

    unread,
    Feb 13, 2026, 6:55:31 PM (8 days ago) Feb 13
    to Michal Mocny, Johannes Henkel, Chromium LUCI CQ, chromium...@chromium.org, blink-...@chromium.org, core-timi...@chromium.org, speed-metrics...@chromium.org
    Attention needed from Johannes Henkel and Michal Mocny

    Scott Haseley added 1 comment

    File third_party/blink/renderer/core/timing/window_performance.cc
    Line 697, Patchset 4 (Latest): DomWindow()->GetFrame()->GetChromeClient().NotifyPresentationTime(
    Johannes Henkel . unresolved

    This is still in the same method, but I think you removed the check from l. 651 (base version) so it could crash? Or is checking for |entry| sufficient to prevent a null dereference?

    Michal Mocny

    I thought it was, but I will add it back to be extra careful.

    In general I wouldn't think this could change in the middle of event dispatch (and still have the event finish dispatch), but I've been surprised before! (i.e. devtools debugging pauses or something)

    Scott Haseley

    Along the lines of what I asked in the other comment, I'm pretty sure you can construct an example where an iframe causes itself to be removed in an event handler.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Johannes Henkel
    • Michal Mocny
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement 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: I4612270e4760a0286668a31bc97e299ea8cbc16f
    Gerrit-Change-Number: 7571910
    Gerrit-PatchSet: 4
    Gerrit-Owner: Michal Mocny <mmo...@chromium.org>
    Gerrit-Reviewer: Johannes Henkel <joha...@chromium.org>
    Gerrit-Reviewer: Michal Mocny <mmo...@chromium.org>
    Gerrit-Reviewer: Scott Haseley <shas...@chromium.org>
    Gerrit-Attention: Johannes Henkel <joha...@chromium.org>
    Gerrit-Attention: Michal Mocny <mmo...@chromium.org>
    Gerrit-Comment-Date: Fri, 13 Feb 2026 23:55:26 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Johannes Henkel <joha...@chromium.org>
    Comment-In-Reply-To: Michal Mocny <mmo...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Michal Mocny (Gerrit)

    unread,
    Feb 13, 2026, 7:08:31 PM (8 days ago) Feb 13
    to Scott Haseley, Johannes Henkel, Chromium LUCI CQ, chromium...@chromium.org, blink-...@chromium.org, core-timi...@chromium.org, speed-metrics...@chromium.org
    Attention needed from Johannes Henkel and Scott Haseley

    Michal Mocny added 1 comment

    File third_party/blink/renderer/core/timing/window_performance.cc
    Line 697, Patchset 4 (Latest): DomWindow()->GetFrame()->GetChromeClient().NotifyPresentationTime(
    Johannes Henkel . unresolved

    This is still in the same method, but I think you removed the check from l. 651 (base version) so it could crash? Or is checking for |entry| sufficient to prevent a null dereference?

    Michal Mocny

    I thought it was, but I will add it back to be extra careful.

    In general I wouldn't think this could change in the middle of event dispatch (and still have the event finish dispatch), but I've been surprised before! (i.e. devtools debugging pauses or something)

    Scott Haseley

    Along the lines of what I asked in the other comment, I'm pretty sure you can construct an example where an iframe causes itself to be removed in an event handler.

    Michal Mocny

    lol, test failures confirm it!

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Johannes Henkel
    • Scott Haseley
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement 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: I4612270e4760a0286668a31bc97e299ea8cbc16f
    Gerrit-Change-Number: 7571910
    Gerrit-PatchSet: 4
    Gerrit-Owner: Michal Mocny <mmo...@chromium.org>
    Gerrit-Reviewer: Johannes Henkel <joha...@chromium.org>
    Gerrit-Reviewer: Michal Mocny <mmo...@chromium.org>
    Gerrit-Reviewer: Scott Haseley <shas...@chromium.org>
    Gerrit-Attention: Johannes Henkel <joha...@chromium.org>
    Gerrit-Attention: Scott Haseley <shas...@chromium.org>
    Gerrit-Comment-Date: Sat, 14 Feb 2026 00:08:25 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Johannes Henkel <joha...@chromium.org>
    Comment-In-Reply-To: Scott Haseley <shas...@chromium.org>
    Comment-In-Reply-To: Michal Mocny <mmo...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Johannes Henkel (Gerrit)

    unread,
    Feb 14, 2026, 1:34:42 AM (8 days ago) Feb 14
    to Michal Mocny, Scott Haseley, Chromium LUCI CQ, chromium...@chromium.org, blink-...@chromium.org, core-timi...@chromium.org, speed-metrics...@chromium.org
    Attention needed from Michal Mocny

    Johannes Henkel added 1 comment

    File third_party/blink/renderer/core/timing/event_timing.cc
    Line 124, Patchset 4 (Latest): // event_ might potentially be null if this is std::move()-ed.
    Johannes Henkel . unresolved

    This pre-existing comment feels a little scary, is this an indication that stuff gets processed out of the expected RAII order? Could it be that the new, more efficient code is more reliant on the order than the original (the search in the other file that you're getting rid of, basically)? (speculating / ignore as you see fit please, I think I don't understand it well enough yet to really tell)

    Scott Haseley

    No I think it's just a product of this being moveable (during creation). This is common for moveable RAII classes, and you'd have to make it non-moveable to avoid this. (btw it should be "this will be null if this has been moved", not potentially).

    Johannes Henkel

    Interesting. So, by changing the header to

      EventTiming(EventTiming&&) = delete;
    EventTiming& operator=(EventTiming&&) = delete;

    I confirmed that TryCreate does in fact cause something like std::move to happen, as the object is returned in the std::optional - it won't compile with the delete version above.

    Below some speculation / theory:

    I'm also thinking that maybe the destructor runs twice, once as the thingy that was stack-allocated in TryCreate gets deleted (the remnants of what was moved), and then in the caller (there are multiple), once the std::optional<EventTiming> goes out of scope.

    And, the check in l. 125 below may accomplish to filter out the bogus constructor invocation, because the Persistent<Foo> is smart enough to clear out event_ from the stack-allocated instance?

    On the usage of the Persistent<Foo> field: I have the feeling that it's actually correct, because the stack is a garbage collection root, and we don't want these objects to get garbage collected before the EventTiming instance gets deleted?

    Perhaps we could do away with the TryCreate returning an std::optional<EventTiming> with the hidden move stuff, and instead have that logic in a more pedestrian instance method. E.g., void Init(...) with the same parameters as TryCreate?

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Michal Mocny
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement 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: I4612270e4760a0286668a31bc97e299ea8cbc16f
    Gerrit-Change-Number: 7571910
    Gerrit-PatchSet: 4
    Gerrit-Owner: Michal Mocny <mmo...@chromium.org>
    Gerrit-Reviewer: Johannes Henkel <joha...@chromium.org>
    Gerrit-Reviewer: Michal Mocny <mmo...@chromium.org>
    Gerrit-Reviewer: Scott Haseley <shas...@chromium.org>
    Gerrit-Attention: Michal Mocny <mmo...@chromium.org>
    Gerrit-Comment-Date: Sat, 14 Feb 2026 06:34:37 +0000
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Michal Mocny (Gerrit)

    unread,
    Feb 14, 2026, 8:46:50 AM (8 days ago) Feb 14
    to Scott Haseley, Johannes Henkel, Chromium LUCI CQ, chromium...@chromium.org, blink-...@chromium.org, core-timi...@chromium.org, speed-metrics...@chromium.org
    Attention needed from Johannes Henkel and Scott Haseley

    Michal Mocny added 1 comment

    File third_party/blink/renderer/core/timing/event_timing.cc
    Line 124, Patchset 4 (Latest): // event_ might potentially be null if this is std::move()-ed.
    Johannes Henkel . resolved

    This pre-existing comment feels a little scary, is this an indication that stuff gets processed out of the expected RAII order? Could it be that the new, more efficient code is more reliant on the order than the original (the search in the other file that you're getting rid of, basically)? (speculating / ignore as you see fit please, I think I don't understand it well enough yet to really tell)

    Scott Haseley

    No I think it's just a product of this being moveable (during creation). This is common for moveable RAII classes, and you'd have to make it non-moveable to avoid this. (btw it should be "this will be null if this has been moved", not potentially).

    Johannes Henkel

    Interesting. So, by changing the header to

      EventTiming(EventTiming&&) = delete;
    EventTiming& operator=(EventTiming&&) = delete;

    I confirmed that TryCreate does in fact cause something like std::move to happen, as the object is returned in the std::optional - it won't compile with the delete version above.

    Below some speculation / theory:

    I'm also thinking that maybe the destructor runs twice, once as the thingy that was stack-allocated in TryCreate gets deleted (the remnants of what was moved), and then in the caller (there are multiple), once the std::optional<EventTiming> goes out of scope.

    And, the check in l. 125 below may accomplish to filter out the bogus constructor invocation, because the Persistent<Foo> is smart enough to clear out event_ from the stack-allocated instance?

    On the usage of the Persistent<Foo> field: I have the feeling that it's actually correct, because the stack is a garbage collection root, and we don't want these objects to get garbage collected before the EventTiming instance gets deleted?

    Perhaps we could do away with the TryCreate returning an std::optional<EventTiming> with the hidden move stuff, and instead have that logic in a more pedestrian instance method. E.g., void Init(...) with the same parameters as TryCreate?

    Michal Mocny

    I think I will not change this established pattern, but will update the semanstics a bit and clean the small new bug introduced.

    (The idea of move semantics leaving an empty shell of an object behind that gets destructed is pretty standard modern C++, and I prefer assigning optionals to creating Init() methods, which just have the opposite problem: you could destruct a non-initialized object that has an empty event_)

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Johannes Henkel
    • Scott Haseley
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement 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: I4612270e4760a0286668a31bc97e299ea8cbc16f
    Gerrit-Change-Number: 7571910
    Gerrit-PatchSet: 4
    Gerrit-Owner: Michal Mocny <mmo...@chromium.org>
    Gerrit-Reviewer: Johannes Henkel <joha...@chromium.org>
    Gerrit-Reviewer: Michal Mocny <mmo...@chromium.org>
    Gerrit-Reviewer: Scott Haseley <shas...@chromium.org>
    Gerrit-Attention: Johannes Henkel <joha...@chromium.org>
    Gerrit-Attention: Scott Haseley <shas...@chromium.org>
    Gerrit-Comment-Date: Sat, 14 Feb 2026 13:46:43 +0000
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Michal Mocny (Gerrit)

    unread,
    Feb 14, 2026, 9:17:49 AM (8 days ago) Feb 14
    to Scott Haseley, Johannes Henkel, Chromium LUCI CQ, chromium...@chromium.org, blink-...@chromium.org, core-timi...@chromium.org, speed-metrics...@chromium.org
    Attention needed from Johannes Henkel and Scott Haseley

    Michal Mocny added 4 comments

    File third_party/blink/renderer/core/timing/event_timing.h
    Line 61, Patchset 4 (Latest): Persistent<PerformanceEventTiming> entry_;
    Scott Haseley . resolved

    This (and the others) really should be stored as raw pointers since this is stack allocated. I think for `event_` that would require clearing state on move() though.

    Michal Mocny

    There was recently some back and forth on this best practice, I thought. If its alright with you, I will leave this for this patch and we can investigate?

    File third_party/blink/renderer/core/timing/window_performance.cc
    Line 651, Patchset 4 (Parent): if (!DomWindow() || !DomWindow()->GetFrame()) {
    Scott Haseley . resolved

    What would happen if running the event handler detaches the window?

    Michal Mocny

    Done

    Johannes Henkel . resolved

    Maybe a check of sorts to guard against underflow in the next line?
    E.g. CHECK(entry_nesting_level_ > 0);

    Michal Mocny

    Done

    Line 697, Patchset 4 (Latest): DomWindow()->GetFrame()->GetChromeClient().NotifyPresentationTime(
    Johannes Henkel . resolved

    This is still in the same method, but I think you removed the check from l. 651 (base version) so it could crash? Or is checking for |entry| sufficient to prevent a null dereference?

    Michal Mocny

    I thought it was, but I will add it back to be extra careful.

    In general I wouldn't think this could change in the middle of event dispatch (and still have the event finish dispatch), but I've been surprised before! (i.e. devtools debugging pauses or something)

    Scott Haseley

    Along the lines of what I asked in the other comment, I'm pretty sure you can construct an example where an iframe causes itself to be removed in an event handler.

    Michal Mocny

    lol, test failures confirm it!

    Michal Mocny

    I've added back the guard, but also done so slightly more robustly: if the event starts to get processed and the window is detached, we would previously leave the event in a half measured state.

    This is somewhat fine, the event timing has no window to get reported to, and presumably the performance object is going to get cleaned up too.

    But the state of the event timing measurements gets into a broken place and if ever there were more event timings things may blow up, so I "unwind the work of the event stack" and explicitly assign a fallback time for this case.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Johannes Henkel
    • Scott Haseley
    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: I4612270e4760a0286668a31bc97e299ea8cbc16f
      Gerrit-Change-Number: 7571910
      Gerrit-PatchSet: 4
      Gerrit-Owner: Michal Mocny <mmo...@chromium.org>
      Gerrit-Reviewer: Johannes Henkel <joha...@chromium.org>
      Gerrit-Reviewer: Michal Mocny <mmo...@chromium.org>
      Gerrit-Reviewer: Scott Haseley <shas...@chromium.org>
      Gerrit-Attention: Johannes Henkel <joha...@chromium.org>
      Gerrit-Attention: Scott Haseley <shas...@chromium.org>
      Gerrit-Comment-Date: Sat, 14 Feb 2026 14:17:42 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Johannes Henkel <joha...@chromium.org>
      Comment-In-Reply-To: Scott Haseley <shas...@chromium.org>
      Comment-In-Reply-To: Michal Mocny <mmo...@chromium.org>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Michal Mocny (Gerrit)

      unread,
      Feb 14, 2026, 10:12:19 AM (8 days ago) Feb 14
      to Scott Haseley, Johannes Henkel, Chromium LUCI CQ, chromium...@chromium.org, blink-...@chromium.org, core-timi...@chromium.org, speed-metrics...@chromium.org
      Attention needed from Johannes Henkel and Scott Haseley

      Michal Mocny added 1 comment

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

      cl passed the run, and ive addressed feedback. ptal next week!

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Johannes Henkel
      • Scott Haseley
      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: I4612270e4760a0286668a31bc97e299ea8cbc16f
      Gerrit-Change-Number: 7571910
      Gerrit-PatchSet: 6
      Gerrit-Owner: Michal Mocny <mmo...@chromium.org>
      Gerrit-Reviewer: Johannes Henkel <joha...@chromium.org>
      Gerrit-Reviewer: Michal Mocny <mmo...@chromium.org>
      Gerrit-Reviewer: Scott Haseley <shas...@chromium.org>
      Gerrit-Attention: Johannes Henkel <joha...@chromium.org>
      Gerrit-Attention: Scott Haseley <shas...@chromium.org>
      Gerrit-Comment-Date: Sat, 14 Feb 2026 15:12:13 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Michal Mocny (Gerrit)

      unread,
      Feb 15, 2026, 9:17:54 PM (6 days ago) Feb 15
      to Scott Haseley, Johannes Henkel, Chromium LUCI CQ, chromium...@chromium.org, blink-...@chromium.org, core-timi...@chromium.org, speed-metrics...@chromium.org

      Michal Mocny abandoned this change.

      View Change

      Michal Mocny 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
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Michal Mocny (Gerrit)

      unread,
      Feb 15, 2026, 10:19:57 PM (6 days ago) Feb 15
      to Scott Haseley, Johannes Henkel, Chromium LUCI CQ, AyeAye, core-timi...@chromium.org, blink-...@chromium.org, speed-metrics...@chromium.org
      Attention needed from Johannes Henkel and Scott Haseley

      New activity on the change

      Related details

      Attention is currently required from:
      • Johannes Henkel
      • Scott Haseley
      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: I4f9ff820ca957a0a28f95efb9d40e1996a6a6964
      Gerrit-Change-Number: 7580213
      Gerrit-PatchSet: 2
      Gerrit-Owner: Michal Mocny <mmo...@chromium.org>
      Gerrit-Reviewer: Johannes Henkel <joha...@chromium.org>
      Gerrit-Reviewer: Michal Mocny <mmo...@chromium.org>
      Gerrit-Reviewer: Scott Haseley <shas...@chromium.org>
      Gerrit-Attention: Johannes Henkel <joha...@chromium.org>
      Gerrit-Attention: Scott Haseley <shas...@chromium.org>
      Gerrit-Comment-Date: Mon, 16 Feb 2026 03:19:52 +0000
      Gerrit-HasComments: No
      Gerrit-Has-Labels: No
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Scott Haseley (Gerrit)

      unread,
      Feb 17, 2026, 12:25:20 PM (5 days ago) Feb 17
      to Michal Mocny, Johannes Henkel, Chromium LUCI CQ, chromium...@chromium.org, blink-...@chromium.org, core-timi...@chromium.org, speed-metrics...@chromium.org

      Scott Haseley added 1 comment

      File third_party/blink/renderer/core/timing/event_timing.cc
      Line 124, Patchset 4: // event_ might potentially be null if this is std::move()-ed.
      Johannes Henkel . resolved

      This pre-existing comment feels a little scary, is this an indication that stuff gets processed out of the expected RAII order? Could it be that the new, more efficient code is more reliant on the order than the original (the search in the other file that you're getting rid of, basically)? (speculating / ignore as you see fit please, I think I don't understand it well enough yet to really tell)

      Scott Haseley

      No I think it's just a product of this being moveable (during creation). This is common for moveable RAII classes, and you'd have to make it non-moveable to avoid this. (btw it should be "this will be null if this has been moved", not potentially).

      Johannes Henkel

      Interesting. So, by changing the header to

        EventTiming(EventTiming&&) = delete;
      EventTiming& operator=(EventTiming&&) = delete;

      I confirmed that TryCreate does in fact cause something like std::move to happen, as the object is returned in the std::optional - it won't compile with the delete version above.

      Below some speculation / theory:

      I'm also thinking that maybe the destructor runs twice, once as the thingy that was stack-allocated in TryCreate gets deleted (the remnants of what was moved), and then in the caller (there are multiple), once the std::optional<EventTiming> goes out of scope.

      And, the check in l. 125 below may accomplish to filter out the bogus constructor invocation, because the Persistent<Foo> is smart enough to clear out event_ from the stack-allocated instance?

      On the usage of the Persistent<Foo> field: I have the feeling that it's actually correct, because the stack is a garbage collection root, and we don't want these objects to get garbage collected before the EventTiming instance gets deleted?

      Perhaps we could do away with the TryCreate returning an std::optional<EventTiming> with the hidden move stuff, and instead have that logic in a more pedestrian instance method. E.g., void Init(...) with the same parameters as TryCreate?

      Michal Mocny

      I think I will not change this established pattern, but will update the semanstics a bit and clean the small new bug introduced.

      (The idea of move semantics leaving an empty shell of an object behind that gets destructed is pretty standard modern C++, and I prefer assigning optionals to creating Init() methods, which just have the opposite problem: you could destruct a non-initialized object that has an empty event_)

      Scott Haseley

      On the usage of the Persistent<Foo> field: I have the feeling that it's actually correct, because the stack is a garbage collection root, and we don't want these objects to get garbage collected before the EventTiming instance gets deleted?

      That's not true: Blink does conservative stack scanning to avoid GCing objects with a raw pointer on the stack. Please see https://chromium.googlesource.com/chromium/src/+/main/third_party/blink/renderer/platform/heap/BlinkGCAPIReference.md#stack_allocated for the part specifically about using raw pointers in STACK_ALLOCATED objects and https://chromium.googlesource.com/chromium/src/+/main/third_party/blink/renderer/platform/heap/BlinkGCAPIReference.md#raw-pointers for the general case. You should only need Persistent<> when the object doesn't live on the stack, or (as recently learned) if you need to keep it alive past when it's used on the stack, neither or which I believe apply here.

      Open in Gerrit

      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: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: I4612270e4760a0286668a31bc97e299ea8cbc16f
      Gerrit-Change-Number: 7571910
      Gerrit-PatchSet: 6
      Gerrit-Owner: Michal Mocny <mmo...@chromium.org>
      Gerrit-Reviewer: Johannes Henkel <joha...@chromium.org>
      Gerrit-Reviewer: Michal Mocny <mmo...@chromium.org>
      Gerrit-Reviewer: Scott Haseley <shas...@chromium.org>
      Gerrit-Comment-Date: Tue, 17 Feb 2026 17:25:14 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Scott Haseley (Gerrit)

      unread,
      Feb 17, 2026, 12:42:12 PM (5 days ago) Feb 17
      to Michal Mocny, Johannes Henkel, Chromium LUCI CQ, AyeAye, core-timi...@chromium.org, blink-...@chromium.org, speed-metrics...@chromium.org
      Attention needed from Johannes Henkel and Michal Mocny

      Scott Haseley voted and added 3 comments

      Votes added by Scott Haseley

      Code-Review+1

      3 comments

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

      LGTM w/ caveat

      File third_party/blink/renderer/core/timing/event_timing.h
      Line 61, Patchset 3 (Latest): Persistent<PerformanceEventTiming> entry_;
      Scott Haseley . unresolved

      I won't block this since this is the established pattern here, but I think this is wrong. This class was changed from heap allocated (where persistents were needed) to STACK_ALLOCATED here: https://chromium-review.googlesource.com/c/chromium/src/+/5627563/16/third_party/blink/renderer/core/timing/event_timing.h), and I think this was just missed in review.

      From https://chromium.googlesource.com/chromium/src/+/main/third_party/blink/renderer/platform/heap/BlinkGCAPIReference.md#STACK_ALLOCATED: "Any fields holding garbage-collected objects should use raw pointers or references."

      And since the values are all used in the destructor, there's no risk of scoping issues like we saw with the tracing thing recently.

      If we don't fix this here, can we follow up and fix this?

      File third_party/blink/renderer/core/timing/window_performance.cc
      Line 396, Patchset 3 (Latest): for (base::TimeTicks LoadTimingInfo::* ts :
      Scott Haseley . unresolved

      Is this from JJ doing too much formatting? Fine to keep it, but the blame will be a bit wonky.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Johannes Henkel
      • 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: I4f9ff820ca957a0a28f95efb9d40e1996a6a6964
      Gerrit-Change-Number: 7580213
      Gerrit-PatchSet: 3
      Gerrit-Owner: Michal Mocny <mmo...@chromium.org>
      Gerrit-Reviewer: Johannes Henkel <joha...@chromium.org>
      Gerrit-Reviewer: Michal Mocny <mmo...@chromium.org>
      Gerrit-Reviewer: Scott Haseley <shas...@chromium.org>
      Gerrit-Attention: Johannes Henkel <joha...@chromium.org>
      Gerrit-Attention: Michal Mocny <mmo...@chromium.org>
      Gerrit-Comment-Date: Tue, 17 Feb 2026 17:42:05 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Michal Mocny (Gerrit)

      unread,
      Feb 17, 2026, 12:44:57 PM (5 days ago) Feb 17
      to Scott Haseley, Johannes Henkel, Chromium LUCI CQ, AyeAye, core-timi...@chromium.org, blink-...@chromium.org, speed-metrics...@chromium.org
      Attention needed from Johannes Henkel and Scott Haseley

      Michal Mocny added 2 comments

      File third_party/blink/renderer/core/timing/event_timing.h
      Line 61, Patchset 3 (Latest): Persistent<PerformanceEventTiming> entry_;
      Scott Haseley . unresolved

      I won't block this since this is the established pattern here, but I think this is wrong. This class was changed from heap allocated (where persistents were needed) to STACK_ALLOCATED here: https://chromium-review.googlesource.com/c/chromium/src/+/5627563/16/third_party/blink/renderer/core/timing/event_timing.h), and I think this was just missed in review.

      From https://chromium.googlesource.com/chromium/src/+/main/third_party/blink/renderer/platform/heap/BlinkGCAPIReference.md#STACK_ALLOCATED: "Any fields holding garbage-collected objects should use raw pointers or references."

      And since the values are all used in the destructor, there's no risk of scoping issues like we saw with the tracing thing recently.

      If we don't fix this here, can we follow up and fix this?

      Michal Mocny

      I will fix in this patch, then!

      File third_party/blink/renderer/core/timing/window_performance.cc
      Line 396, Patchset 3 (Latest): for (base::TimeTicks LoadTimingInfo::* ts :
      Scott Haseley . unresolved

      Is this from JJ doing too much formatting? Fine to keep it, but the blame will be a bit wonky.

      Michal Mocny

      It is. `jj fix` is the equivalent of `git cl format` but has a known bug where it formats the whole file. Uploads via JJ will automatically run a fix.

      But I've since learned that I can upload with `jj upload --no-fix`, and can still rely on `git cl format` manually.

      I will do so!

      (not a huge deal for this patch, but future revisions have larger deltas)

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Johannes Henkel
      • 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: I4f9ff820ca957a0a28f95efb9d40e1996a6a6964
      Gerrit-Change-Number: 7580213
      Gerrit-PatchSet: 3
      Gerrit-Owner: Michal Mocny <mmo...@chromium.org>
      Gerrit-Reviewer: Johannes Henkel <joha...@chromium.org>
      Gerrit-Reviewer: Michal Mocny <mmo...@chromium.org>
      Gerrit-Reviewer: Scott Haseley <shas...@chromium.org>
      Gerrit-Attention: Johannes Henkel <joha...@chromium.org>
      Gerrit-Attention: Scott Haseley <shas...@chromium.org>
      Gerrit-Comment-Date: Tue, 17 Feb 2026 17:44:53 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Scott Haseley <shas...@chromium.org>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Michal Mocny (Gerrit)

      unread,
      Feb 17, 2026, 5:26:03 PM (5 days ago) Feb 17
      to Scott Haseley, Johannes Henkel, Chromium LUCI CQ, AyeAye, core-timi...@chromium.org, blink-...@chromium.org, speed-metrics...@chromium.org
      Attention needed from Johannes Henkel

      Michal Mocny added 2 comments

      File third_party/blink/renderer/core/timing/event_timing.h
      Line 61, Patchset 3: Persistent<PerformanceEventTiming> entry_;
      Scott Haseley . resolved

      I won't block this since this is the established pattern here, but I think this is wrong. This class was changed from heap allocated (where persistents were needed) to STACK_ALLOCATED here: https://chromium-review.googlesource.com/c/chromium/src/+/5627563/16/third_party/blink/renderer/core/timing/event_timing.h), and I think this was just missed in review.

      From https://chromium.googlesource.com/chromium/src/+/main/third_party/blink/renderer/platform/heap/BlinkGCAPIReference.md#STACK_ALLOCATED: "Any fields holding garbage-collected objects should use raw pointers or references."

      And since the values are all used in the destructor, there's no risk of scoping issues like we saw with the tracing thing recently.

      If we don't fix this here, can we follow up and fix this?

      Michal Mocny

      I will fix in this patch, then!

      Michal Mocny

      Done

      File third_party/blink/renderer/core/timing/window_performance.cc
      Line 396, Patchset 3: for (base::TimeTicks LoadTimingInfo::* ts :
      Scott Haseley . resolved

      Is this from JJ doing too much formatting? Fine to keep it, but the blame will be a bit wonky.

      Michal Mocny

      It is. `jj fix` is the equivalent of `git cl format` but has a known bug where it formats the whole file. Uploads via JJ will automatically run a fix.

      But I've since learned that I can upload with `jj upload --no-fix`, and can still rely on `git cl format` manually.

      I will do so!

      (not a huge deal for this patch, but future revisions have larger deltas)

      Michal Mocny

      Done

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Johannes Henkel
      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: I4f9ff820ca957a0a28f95efb9d40e1996a6a6964
        Gerrit-Change-Number: 7580213
        Gerrit-PatchSet: 6
        Gerrit-Owner: Michal Mocny <mmo...@chromium.org>
        Gerrit-Reviewer: Johannes Henkel <joha...@chromium.org>
        Gerrit-Reviewer: Michal Mocny <mmo...@chromium.org>
        Gerrit-Reviewer: Scott Haseley <shas...@chromium.org>
        Gerrit-Attention: Johannes Henkel <joha...@chromium.org>
        Gerrit-Comment-Date: Tue, 17 Feb 2026 22:26:00 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        Comment-In-Reply-To: Scott Haseley <shas...@chromium.org>
        Comment-In-Reply-To: Michal Mocny <mmo...@chromium.org>
        satisfied_requirement
        open
        diffy

        Johannes Henkel (Gerrit)

        unread,
        Feb 17, 2026, 5:41:23 PM (5 days ago) Feb 17
        to Michal Mocny, Scott Haseley, Chromium LUCI CQ, AyeAye, core-timi...@chromium.org, blink-...@chromium.org, speed-metrics...@chromium.org
        Attention needed from Michal Mocny

        Johannes Henkel added 1 comment

        File third_party/blink/renderer/core/timing/event_timing.cc
        Line 126, Patchset 6 (Latest): if (event_ && performance_) {
        Johannes Henkel . unresolved

        I think this stuff being null relied on behavior from the Persistent template, so now you'd have to clear these in a custom implementation of one of these or set a bool or similar to indicate that the destructor shouldn't run?

          EventTiming(EventTiming&&) = default;
        EventTiming& operator=(EventTiming&&) = default;
        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: I4f9ff820ca957a0a28f95efb9d40e1996a6a6964
          Gerrit-Change-Number: 7580213
          Gerrit-PatchSet: 6
          Gerrit-Owner: Michal Mocny <mmo...@chromium.org>
          Gerrit-Reviewer: Johannes Henkel <joha...@chromium.org>
          Gerrit-Reviewer: Michal Mocny <mmo...@chromium.org>
          Gerrit-Reviewer: Scott Haseley <shas...@chromium.org>
          Gerrit-Attention: Michal Mocny <mmo...@chromium.org>
          Gerrit-Comment-Date: Tue, 17 Feb 2026 22:41:17 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Michal Mocny (Gerrit)

          unread,
          Feb 17, 2026, 5:46:31 PM (5 days ago) Feb 17
          to Scott Haseley, Johannes Henkel, Chromium LUCI CQ, AyeAye, core-timi...@chromium.org, blink-...@chromium.org, speed-metrics...@chromium.org
          Attention needed from Johannes Henkel and Scott Haseley

          Michal Mocny added 1 comment

          File third_party/blink/renderer/core/timing/event_timing.cc
          Line 126, Patchset 6: if (event_ && performance_) {
          Johannes Henkel . resolved

          I think this stuff being null relied on behavior from the Persistent template, so now you'd have to clear these in a custom implementation of one of these or set a bool or similar to indicate that the destructor shouldn't run?

            EventTiming(EventTiming&&) = default;
          EventTiming& operator=(EventTiming&&) = default;
          Michal Mocny

          Good eye! Scott also pinged me about this and new CL already uploaded to fix it, but appreciate it.

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Johannes Henkel
          • 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: I4f9ff820ca957a0a28f95efb9d40e1996a6a6964
          Gerrit-Change-Number: 7580213
          Gerrit-PatchSet: 7
          Gerrit-Owner: Michal Mocny <mmo...@chromium.org>
          Gerrit-Reviewer: Johannes Henkel <joha...@chromium.org>
          Gerrit-Reviewer: Michal Mocny <mmo...@chromium.org>
          Gerrit-Reviewer: Scott Haseley <shas...@chromium.org>
          Gerrit-Attention: Johannes Henkel <joha...@chromium.org>
          Gerrit-Attention: Scott Haseley <shas...@chromium.org>
          Gerrit-Comment-Date: Tue, 17 Feb 2026 22:46:26 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          Comment-In-Reply-To: Johannes Henkel <joha...@chromium.org>
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Johannes Henkel (Gerrit)

          unread,
          Feb 17, 2026, 5:48:33 PM (5 days ago) Feb 17
          to Michal Mocny, Scott Haseley, Chromium LUCI CQ, AyeAye, core-timi...@chromium.org, blink-...@chromium.org, speed-metrics...@chromium.org
          Attention needed from Michal Mocny and Scott Haseley

          Johannes Henkel added 1 comment

          File window_performance.cc.ksoootky
          File-level comment, Patchset 8 (Latest):
          Johannes Henkel . unresolved

          I think this entry is accidental, adding some empty file.

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Michal Mocny
          • 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: I4f9ff820ca957a0a28f95efb9d40e1996a6a6964
            Gerrit-Change-Number: 7580213
            Gerrit-PatchSet: 8
            Gerrit-Owner: Michal Mocny <mmo...@chromium.org>
            Gerrit-Reviewer: Johannes Henkel <joha...@chromium.org>
            Gerrit-Reviewer: Michal Mocny <mmo...@chromium.org>
            Gerrit-Reviewer: Scott Haseley <shas...@chromium.org>
            Gerrit-Attention: Scott Haseley <shas...@chromium.org>
            Gerrit-Attention: Michal Mocny <mmo...@chromium.org>
            Gerrit-Comment-Date: Tue, 17 Feb 2026 22:48:27 +0000
            Gerrit-HasComments: Yes
            Gerrit-Has-Labels: No
            satisfied_requirement
            unsatisfied_requirement
            open
            diffy

            Michal Mocny (Gerrit)

            unread,
            Feb 17, 2026, 6:33:06 PM (4 days ago) Feb 17
            to Scott Haseley, Johannes Henkel, Chromium LUCI CQ, AyeAye, core-timi...@chromium.org, blink-...@chromium.org, speed-metrics...@chromium.org
            Attention needed from Johannes Henkel and Scott Haseley

            Michal Mocny voted and added 1 comment

            Votes added by Michal Mocny

            Commit-Queue+1

            1 comment

            File window_performance.cc.ksoootky
            File-level comment, Patchset 8:
            Johannes Henkel . resolved

            I think this entry is accidental, adding some empty file.

            Michal Mocny

            Done

            Open in Gerrit

            Related details

            Attention is currently required from:
            • Johannes Henkel
            • Scott Haseley
            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: I4f9ff820ca957a0a28f95efb9d40e1996a6a6964
            Gerrit-Change-Number: 7580213
            Gerrit-PatchSet: 8
            Gerrit-Owner: Michal Mocny <mmo...@chromium.org>
            Gerrit-Reviewer: Johannes Henkel <joha...@chromium.org>
            Gerrit-Reviewer: Michal Mocny <mmo...@chromium.org>
            Gerrit-Reviewer: Scott Haseley <shas...@chromium.org>
            Gerrit-Attention: Johannes Henkel <joha...@chromium.org>
            Gerrit-Attention: Scott Haseley <shas...@chromium.org>
            Gerrit-Comment-Date: Tue, 17 Feb 2026 23:33:01 +0000
            Gerrit-HasComments: Yes
            Gerrit-Has-Labels: Yes
            Comment-In-Reply-To: Johannes Henkel <joha...@chromium.org>
            satisfied_requirement
            unsatisfied_requirement
            open
            diffy

            Scott Haseley (Gerrit)

            unread,
            Feb 17, 2026, 6:37:01 PM (4 days ago) Feb 17
            to Michal Mocny, Johannes Henkel, Chromium LUCI CQ, AyeAye, core-timi...@chromium.org, blink-...@chromium.org, speed-metrics...@chromium.org
            Attention needed from Johannes Henkel and Michal Mocny

            Scott Haseley voted and added 1 comment

            Votes added by Scott Haseley

            Code-Review+1

            1 comment

            Patchset-level comments
            Scott Haseley . resolved

            LGTM

            Open in Gerrit

            Related details

            Attention is currently required from:
            • Johannes Henkel
            • 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: I4f9ff820ca957a0a28f95efb9d40e1996a6a6964
              Gerrit-Change-Number: 7580213
              Gerrit-PatchSet: 9
              Gerrit-Owner: Michal Mocny <mmo...@chromium.org>
              Gerrit-Reviewer: Johannes Henkel <joha...@chromium.org>
              Gerrit-Reviewer: Michal Mocny <mmo...@chromium.org>
              Gerrit-Reviewer: Scott Haseley <shas...@chromium.org>
              Gerrit-Attention: Johannes Henkel <joha...@chromium.org>
              Gerrit-Attention: Michal Mocny <mmo...@chromium.org>
              Gerrit-Comment-Date: Tue, 17 Feb 2026 23:36:52 +0000
              Gerrit-HasComments: Yes
              Gerrit-Has-Labels: Yes
              satisfied_requirement
              open
              diffy

              Johannes Henkel (Gerrit)

              unread,
              Feb 17, 2026, 6:38:53 PM (4 days ago) Feb 17
              to Michal Mocny, Scott Haseley, Chromium LUCI CQ, AyeAye, core-timi...@chromium.org, blink-...@chromium.org, speed-metrics...@chromium.org
              Attention needed from Michal Mocny

              Johannes Henkel voted Code-Review+1

              Code-Review+1
              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: I4f9ff820ca957a0a28f95efb9d40e1996a6a6964
              Gerrit-Change-Number: 7580213
              Gerrit-PatchSet: 9
              Gerrit-Owner: Michal Mocny <mmo...@chromium.org>
              Gerrit-Reviewer: Johannes Henkel <joha...@chromium.org>
              Gerrit-Reviewer: Michal Mocny <mmo...@chromium.org>
              Gerrit-Reviewer: Scott Haseley <shas...@chromium.org>
              Gerrit-Attention: Michal Mocny <mmo...@chromium.org>
              Gerrit-Comment-Date: Tue, 17 Feb 2026 23:38:47 +0000
              Gerrit-HasComments: No
              Gerrit-Has-Labels: Yes
              satisfied_requirement
              open
              diffy

              Michal Mocny (Gerrit)

              unread,
              Feb 17, 2026, 6:42:44 PM (4 days ago) Feb 17
              to Johannes Henkel, Scott Haseley, Chromium LUCI CQ, AyeAye, core-timi...@chromium.org, blink-...@chromium.org, speed-metrics...@chromium.org

              Michal Mocny voted Commit-Queue+2

              Commit-Queue+2
              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: I4f9ff820ca957a0a28f95efb9d40e1996a6a6964
              Gerrit-Change-Number: 7580213
              Gerrit-PatchSet: 9
              Gerrit-Owner: Michal Mocny <mmo...@chromium.org>
              Gerrit-Reviewer: Johannes Henkel <joha...@chromium.org>
              Gerrit-Reviewer: Michal Mocny <mmo...@chromium.org>
              Gerrit-Reviewer: Scott Haseley <shas...@chromium.org>
              Gerrit-Comment-Date: Tue, 17 Feb 2026 23:42:38 +0000
              Gerrit-HasComments: No
              Gerrit-Has-Labels: Yes
              satisfied_requirement
              open
              diffy

              Chromium LUCI CQ (Gerrit)

              unread,
              Feb 17, 2026, 9:08:27 PM (4 days ago) Feb 17
              to Michal Mocny, Johannes Henkel, Scott Haseley, AyeAye, core-timi...@chromium.org, blink-...@chromium.org, speed-metrics...@chromium.org

              Chromium LUCI CQ submitted the change

              Change information

              Commit message:
              [event-timing] Simplify Event Timing entry tracking during RAII stack

              EventTiming creates a performance entry at ProcessingStart, and relies
              on a RAII stack based object to track the start->end of event dispatch
              processing times. At ProcessingEnd, we need to match to the original
              event timing performance entry, in order to update timings.

              Previously, we would search through the list of event timings to assume
              we found the right match, and would do another similar search to check
              if we have nested scopes.

              This change simplifies that by just storing a reference in the RAII
              object we are already guaranteed to have access to. This is part of a
              larger cleanup which moves more work into the RAII scope of the Event.

              Also adds better handling (rare) cases of a window becoming detached during
              event dispatch of the event being measured.
              Bug: 328902994
              Change-Id: I4f9ff820ca957a0a28f95efb9d40e1996a6a6964
              Reviewed-by: Scott Haseley <shas...@chromium.org>
              Reviewed-by: Johannes Henkel <joha...@chromium.org>
              Commit-Queue: Michal Mocny <mmo...@chromium.org>
              Cr-Commit-Position: refs/heads/main@{#1586137}
              Files:
              • M third_party/blink/renderer/core/timing/event_timing.cc
              • M third_party/blink/renderer/core/timing/event_timing.h
              • M third_party/blink/renderer/core/timing/performance_event_timing.cc
              • M third_party/blink/renderer/core/timing/performance_event_timing.h
              • M third_party/blink/renderer/core/timing/window_performance.cc
              • M third_party/blink/renderer/core/timing/window_performance.h
              • M third_party/blink/renderer/core/timing/window_performance_test.cc
              Change size: M
              Delta: 7 files changed, 74 insertions(+), 54 deletions(-)
              Branch: refs/heads/main
              Submit Requirements:
              • requirement satisfiedCode-Review: +1 by Johannes Henkel, +1 by Scott Haseley
              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: I4f9ff820ca957a0a28f95efb9d40e1996a6a6964
              Gerrit-Change-Number: 7580213
              Gerrit-PatchSet: 10
              Gerrit-Owner: Michal Mocny <mmo...@chromium.org>
              Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
              open
              diffy
              satisfied_requirement
              Reply all
              Reply to author
              Forward
              0 new messages