Put timing values of DocumentTiming in a GCed object [chromium/src : main]

0 views
Skip to first unread message

Guohui Deng (Gerrit)

unread,
Oct 15, 2024, 6:25:53 PMOct 15
to Noam Rosenthal, David Baron, Chromium LUCI CQ, chromium...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, core-timi...@chromium.org
Attention needed from David Baron and Noam Rosenthal

Guohui Deng added 1 comment

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

This is the first CL to address issue 40793421. I think I should do the same to "DocumentLoadTiming" because it has the same problem that it can be GCed before the timing values are collected. I will do that in a follow-up CL.

Thanks for reviewing!

Open in Gerrit

Related details

Attention is currently required from:
  • David Baron
  • Noam Rosenthal
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Review
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: I2cbb53862ff9fab08f963d9408ef65ff462e5dd7
Gerrit-Change-Number: 5935276
Gerrit-PatchSet: 1
Gerrit-Owner: Guohui Deng <guohu...@microsoft.com>
Gerrit-Reviewer: David Baron <dba...@chromium.org>
Gerrit-Reviewer: Guohui Deng <guohu...@microsoft.com>
Gerrit-Reviewer: Noam Rosenthal <nrose...@chromium.org>
Gerrit-Attention: David Baron <dba...@chromium.org>
Gerrit-Attention: Noam Rosenthal <nrose...@chromium.org>
Gerrit-Comment-Date: Tue, 15 Oct 2024 22:25:45 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Noam Rosenthal (Gerrit)

unread,
Oct 16, 2024, 4:45:25 AMOct 16
to Guohui Deng, David Baron, Chromium LUCI CQ, chromium...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, core-timi...@chromium.org
Attention needed from David Baron and Guohui Deng

Noam Rosenthal added 1 comment

Patchset-level comments
Noam Rosenthal . resolved

Thanks for working on this! Please cover this with a test (WPT) and then I'll be happy to review.

Open in Gerrit

Related details

Attention is currently required from:
  • David Baron
  • Guohui Deng
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Review
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: I2cbb53862ff9fab08f963d9408ef65ff462e5dd7
Gerrit-Change-Number: 5935276
Gerrit-PatchSet: 1
Gerrit-Owner: Guohui Deng <guohu...@microsoft.com>
Gerrit-Reviewer: David Baron <dba...@chromium.org>
Gerrit-Reviewer: Guohui Deng <guohu...@microsoft.com>
Gerrit-Reviewer: Noam Rosenthal <nrose...@chromium.org>
Gerrit-Attention: David Baron <dba...@chromium.org>
Gerrit-Attention: Guohui Deng <guohu...@microsoft.com>
Gerrit-Comment-Date: Wed, 16 Oct 2024 08:45:15 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

David Baron (Gerrit)

unread,
Oct 16, 2024, 10:02:48 AMOct 16
to Guohui Deng, Noam Rosenthal, David Baron, Chromium LUCI CQ, chromium...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, core-timi...@chromium.org
Attention needed from Guohui Deng

David Baron added 1 comment

Patchset-level comments
David Baron . resolved

As Noam said, this could use a test in WPT -- probably somewhere near the existing test `third_party/blink/web_tests/external/wpt/navigation-timing/nav2-test-document-replaced.html` that the bug was reported about.

(Also, the lines in the commit message got a little bit mixed up... but once you add a WPT test you also don't need a "Test:" line there.)

Open in Gerrit

Related details

Attention is currently required from:
  • Guohui Deng
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Review
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: I2cbb53862ff9fab08f963d9408ef65ff462e5dd7
Gerrit-Change-Number: 5935276
Gerrit-PatchSet: 1
Gerrit-Owner: Guohui Deng <guohu...@microsoft.com>
Gerrit-Reviewer: David Baron <dba...@chromium.org>
Gerrit-Reviewer: Guohui Deng <guohu...@microsoft.com>
Gerrit-Reviewer: Noam Rosenthal <nrose...@chromium.org>
Gerrit-Attention: Guohui Deng <guohu...@microsoft.com>
Gerrit-Comment-Date: Wed, 16 Oct 2024 14:02:39 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Guohui Deng (Gerrit)

unread,
Oct 21, 2024, 5:46:29 PMOct 21
to AyeAye, Noam Rosenthal, David Baron, Chromium LUCI CQ, chromium...@chromium.org, blink-revie...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, core-timi...@chromium.org

Guohui Deng added 1 comment

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

Thanks guys! I added an assert to /nav2-test-document-replaced.html and I edited commit message.

Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Review
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: I2cbb53862ff9fab08f963d9408ef65ff462e5dd7
Gerrit-Change-Number: 5935276
Gerrit-PatchSet: 3
Gerrit-Owner: Guohui Deng <guohu...@microsoft.com>
Gerrit-Reviewer: David Baron <dba...@chromium.org>
Gerrit-Reviewer: Guohui Deng <guohu...@microsoft.com>
Gerrit-Reviewer: Noam Rosenthal <nrose...@chromium.org>
Gerrit-Comment-Date: Mon, 21 Oct 2024 21:46:19 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Noam Rosenthal (Gerrit)

unread,
Oct 22, 2024, 4:29:13 PMOct 22
to Guohui Deng, AyeAye, David Baron, Chromium LUCI CQ, chromium...@chromium.org, blink-revie...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, core-timi...@chromium.org
Attention needed from Guohui Deng

Noam Rosenthal added 2 comments

Patchset-level comments
Noam Rosenthal . resolved

This is a good addition, thanks!
But I want to see also a new test that only tests this specifically:

  • Create an iframe
  • navigate the iframe
  • Wait for the navigation timing entry to appear
  • Access the timing entry from the iframe's parent
  • Remove the iframe
  • Check that *all* the properties are non-zero

WDYT?

File third_party/blink/web_tests/external/wpt/navigation-timing/nav2-test-document-replaced.html
Line 44, Patchset 3 (Latest): assert_true(pnt1.domInteractive > 0.0000001);
Noam Rosenthal . unresolved

Use assert_greater_than

Open in Gerrit

Related details

Attention is currently required from:
  • Guohui Deng
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    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: I2cbb53862ff9fab08f963d9408ef65ff462e5dd7
    Gerrit-Change-Number: 5935276
    Gerrit-PatchSet: 3
    Gerrit-Owner: Guohui Deng <guohu...@microsoft.com>
    Gerrit-Reviewer: David Baron <dba...@chromium.org>
    Gerrit-Reviewer: Guohui Deng <guohu...@microsoft.com>
    Gerrit-Reviewer: Noam Rosenthal <nrose...@chromium.org>
    Gerrit-Attention: Guohui Deng <guohu...@microsoft.com>
    Gerrit-Comment-Date: Tue, 22 Oct 2024 20:29:01 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Guohui Deng (Gerrit)

    unread,
    Oct 23, 2024, 11:56:04 AMOct 23
    to AyeAye, Noam Rosenthal, David Baron, Chromium LUCI CQ, chromium...@chromium.org, blink-revie...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, core-timi...@chromium.org
    Attention needed from Noam Rosenthal

    Guohui Deng added 1 comment

    Patchset-level comments
    Noam Rosenthal . resolved

    This is a good addition, thanks!
    But I want to see also a new test that only tests this specifically:

    • Create an iframe
    • navigate the iframe
    • Wait for the navigation timing entry to appear
    • Access the timing entry from the iframe's parent
    • Remove the iframe
    • Check that *all* the properties are non-zero

    WDYT?

    Guohui Deng

    Sounds good! I am working on another CL and will get back to this once I submit that one.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Noam Rosenthal
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    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: I2cbb53862ff9fab08f963d9408ef65ff462e5dd7
    Gerrit-Change-Number: 5935276
    Gerrit-PatchSet: 3
    Gerrit-Owner: Guohui Deng <guohu...@microsoft.com>
    Gerrit-Reviewer: David Baron <dba...@chromium.org>
    Gerrit-Reviewer: Guohui Deng <guohu...@microsoft.com>
    Gerrit-Reviewer: Noam Rosenthal <nrose...@chromium.org>
    Gerrit-Attention: Noam Rosenthal <nrose...@chromium.org>
    Gerrit-Comment-Date: Wed, 23 Oct 2024 15:55:55 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Noam Rosenthal <nrose...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Guohui Deng (Gerrit)

    unread,
    Nov 12, 2024, 1:12:14 PMNov 12
    to AyeAye, Noam Rosenthal, David Baron, Chromium LUCI CQ, chromium...@chromium.org, blink-revie...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, core-timi...@chromium.org
    Attention needed from Noam Rosenthal

    Guohui Deng added 3 comments

    Patchset-level comments
    Noam Rosenthal . resolved

    This is a good addition, thanks!
    But I want to see also a new test that only tests this specifically:

    • Create an iframe
    • navigate the iframe
    • Wait for the navigation timing entry to appear
    • Access the timing entry from the iframe's parent
    • Remove the iframe
    • Check that *all* the properties are non-zero

    WDYT?

    Guohui Deng

    Sounds good! I am working on another CL and will get back to this once I submit that one.

    Guohui Deng

    1) I made a new test that does what you mentioned.
    2) I reverted nav2-test-document-replaced.html except for fixing a misspelling.

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

    A new patch is uploaded. Thanks for reviewing!

    File third_party/blink/web_tests/external/wpt/navigation-timing/nav2-test-document-replaced.html
    Line 44, Patchset 3: assert_true(pnt1.domInteractive > 0.0000001);
    Noam Rosenthal . resolved

    Use assert_greater_than

    Guohui Deng

    Used in the new test.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Noam Rosenthal
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Review
    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: I2cbb53862ff9fab08f963d9408ef65ff462e5dd7
    Gerrit-Change-Number: 5935276
    Gerrit-PatchSet: 4
    Gerrit-Owner: Guohui Deng <guohu...@microsoft.com>
    Gerrit-Reviewer: David Baron <dba...@chromium.org>
    Gerrit-Reviewer: Guohui Deng <guohu...@microsoft.com>
    Gerrit-Reviewer: Noam Rosenthal <nrose...@chromium.org>
    Gerrit-Attention: Noam Rosenthal <nrose...@chromium.org>
    Gerrit-Comment-Date: Tue, 12 Nov 2024 18:12:03 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Noam Rosenthal <nrose...@chromium.org>
    Comment-In-Reply-To: Guohui Deng <guohu...@microsoft.com>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Noam Rosenthal (Gerrit)

    unread,
    Nov 12, 2024, 2:44:53 PMNov 12
    to Guohui Deng, AyeAye, David Baron, Chromium LUCI CQ, chromium...@chromium.org, blink-revie...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, core-timi...@chromium.org
    Attention needed from Guohui Deng

    Noam Rosenthal voted and added 3 comments

    Votes added by Noam Rosenthal

    Code-Review+1

    3 comments

    Patchset-level comments
    File-level comment, Patchset 4 (Latest):
    Noam Rosenthal . resolved

    Really nice work! Just a couple of nits and we're done

    File third_party/blink/renderer/core/timing/performance_navigation_timing.cc
    Line 86, Patchset 4 (Latest): visitor->Trace(document_timing_values_);
    Noam Rosenthal . unresolved

    Nit: Perhaps move this to the end of the function?

    File third_party/blink/web_tests/external/wpt/navigation-timing/nav2-test-timing-persistent.html
    Line 26, Patchset 4 (Latest): var ifr = document.createElement("iframe");
    Noam Rosenthal . unresolved

    ifr -> iframe.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Guohui Deng
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not satisfiedCode-Review
      • requirement is not satisfiedNo-Unresolved-Comments
      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: I2cbb53862ff9fab08f963d9408ef65ff462e5dd7
      Gerrit-Change-Number: 5935276
      Gerrit-PatchSet: 4
      Gerrit-Owner: Guohui Deng <guohu...@microsoft.com>
      Gerrit-Reviewer: David Baron <dba...@chromium.org>
      Gerrit-Reviewer: Guohui Deng <guohu...@microsoft.com>
      Gerrit-Reviewer: Noam Rosenthal <nrose...@chromium.org>
      Gerrit-Attention: Guohui Deng <guohu...@microsoft.com>
      Gerrit-Comment-Date: Tue, 12 Nov 2024 19:44:38 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Guohui Deng (Gerrit)

      unread,
      Nov 13, 2024, 4:39:51 PMNov 13
      to Noam Rosenthal, AyeAye, David Baron, Chromium LUCI CQ, chromium...@chromium.org, blink-revie...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, core-timi...@chromium.org
      Attention needed from Noam Rosenthal

      Guohui Deng added 3 comments

      Patchset-level comments
      Noam Rosenthal . resolved

      Really nice work! Just a couple of nits and we're done

      Guohui Deng

      Thanks for the guidance along the way!

      File third_party/blink/renderer/core/timing/performance_navigation_timing.cc
      Line 86, Patchset 4: visitor->Trace(document_timing_values_);
      Noam Rosenthal . unresolved

      Nit: Perhaps move this to the end of the function?

      File third_party/blink/web_tests/external/wpt/navigation-timing/nav2-test-timing-persistent.html
      Line 26, Patchset 4: var ifr = document.createElement("iframe");
      Noam Rosenthal . resolved

      ifr -> iframe.

      Guohui Deng

      Done

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Noam Rosenthal
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not satisfiedCode-Review
      • requirement is not satisfiedNo-Unresolved-Comments
      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: I2cbb53862ff9fab08f963d9408ef65ff462e5dd7
      Gerrit-Change-Number: 5935276
      Gerrit-PatchSet: 5
      Gerrit-Owner: Guohui Deng <guohu...@microsoft.com>
      Gerrit-Reviewer: David Baron <dba...@chromium.org>
      Gerrit-Reviewer: Guohui Deng <guohu...@microsoft.com>
      Gerrit-Reviewer: Noam Rosenthal <nrose...@chromium.org>
      Gerrit-Attention: Noam Rosenthal <nrose...@chromium.org>
      Gerrit-Comment-Date: Wed, 13 Nov 2024 21:39:41 +0000
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Noam Rosenthal (Gerrit)

      unread,
      Nov 13, 2024, 4:44:03 PMNov 13
      to Guohui Deng, AyeAye, David Baron, Chromium LUCI CQ, chromium...@chromium.org, blink-revie...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, core-timi...@chromium.org
      Attention needed from Guohui Deng

      Noam Rosenthal added 1 comment

      File third_party/blink/renderer/core/timing/performance_navigation_timing.cc
      Line 86, Patchset 4: visitor->Trace(document_timing_values_);
      Noam Rosenthal . resolved

      Nit: Perhaps move this to the end of the function?

      Guohui Deng

      Looks like the convention is to trace the members first then Trace the super class.
      https://source.chromium.org/chromium/chromium/src/+/main:v8/include/cppgc/garbage-collected.h;l=46;drc=981ce1e8f82050b33153a9c4652f2ad1cefabff1
      and an example
      https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/frame/report.h;l=43;drc=d7ac47d32bb347baf4318f1c2c0aec00dde493b6
      Would you take one more look to ensure I got it right?

      Noam Rosenthal

      You're right, I got it wrong.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Guohui Deng
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not satisfiedCode-Review
      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: I2cbb53862ff9fab08f963d9408ef65ff462e5dd7
      Gerrit-Change-Number: 5935276
      Gerrit-PatchSet: 5
      Gerrit-Owner: Guohui Deng <guohu...@microsoft.com>
      Gerrit-Reviewer: David Baron <dba...@chromium.org>
      Gerrit-Reviewer: Guohui Deng <guohu...@microsoft.com>
      Gerrit-Reviewer: Noam Rosenthal <nrose...@chromium.org>
      Gerrit-Attention: Guohui Deng <guohu...@microsoft.com>
      Gerrit-Comment-Date: Wed, 13 Nov 2024 21:43:49 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Noam Rosenthal <nrose...@chromium.org>
      Comment-In-Reply-To: Guohui Deng <guohu...@microsoft.com>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Noam Rosenthal (Gerrit)

      unread,
      Nov 13, 2024, 4:44:20 PMNov 13
      to Guohui Deng, AyeAye, David Baron, Chromium LUCI CQ, chromium...@chromium.org, blink-revie...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, core-timi...@chromium.org
      Attention needed from Guohui Deng

      Noam Rosenthal voted Code-Review+1

      Code-Review+1
      Open in Gerrit

      Related details

      Attention is currently required from:
      • Guohui Deng
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not satisfiedCode-Review
      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: I2cbb53862ff9fab08f963d9408ef65ff462e5dd7
      Gerrit-Change-Number: 5935276
      Gerrit-PatchSet: 5
      Gerrit-Owner: Guohui Deng <guohu...@microsoft.com>
      Gerrit-Reviewer: David Baron <dba...@chromium.org>
      Gerrit-Reviewer: Guohui Deng <guohu...@microsoft.com>
      Gerrit-Reviewer: Noam Rosenthal <nrose...@chromium.org>
      Gerrit-Attention: Guohui Deng <guohu...@microsoft.com>
      Gerrit-Comment-Date: Wed, 13 Nov 2024 21:44:07 +0000
      Gerrit-HasComments: No
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      David Baron (Gerrit)

      unread,
      Nov 18, 2024, 11:15:41 AM (14 days ago) Nov 18
      to Guohui Deng, David Baron, Noam Rosenthal, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, blink-revie...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, core-timi...@chromium.org
      Attention needed from Guohui Deng

      David Baron voted and added 8 comments

      Votes added by David Baron

      Code-Review+1

      8 comments

      Patchset-level comments
      File-level comment, Patchset 5 (Latest):
      David Baron . resolved

      LGTM with one C++ change and a bunch of comments on the test (mostly javascript style comments)

      File third_party/blink/renderer/core/dom/document_timing.h
      Line 46, Patchset 5 (Latest): virtual void Trace(Visitor*) const {}
      David Baron . unresolved

      You can remove `virtual` here.

      File third_party/blink/web_tests/external/wpt/navigation-timing/nav2-test-timing-persistent.html
      Line 13, Patchset 5 (Latest): var timingAttributes = [
      David Baron . unresolved

      Probably `const` rather than `var`.

      Line 20, Patchset 5 (Latest): for (i in timingAttributes) {
      David Baron . unresolved

      Use `for (const att of timingAttributes)` and then you can just use `att` instead of `timingAttributes[i]`. (This both switches from `for..in` to `for..of` and adds `const` to declare the variable.)

      Line 21, Patchset 5 (Latest): assert_greater_than(pnt[timingAttributes[i]], 0, description);
      David Baron . unresolved
      The message for this should probly be
      ```
      `${description} ${att}`
      ```
      rather than just
      ```
      description
      ```
      Line 26, Patchset 5 (Latest): var iframe = document.createElement("iframe");
      David Baron . unresolved

      probably `let` or `const` rather than `var`, both here and 9 lines below.

      Line 33, Patchset 5 (Latest): assert_equals(iframe.contentWindow.performance.getEntriesByType("navigation")[0].name, iframe.contentWindow.location.toString(), "navigation name matches the window.location");
      assert_true(iframe.contentWindow.performance.getEntriesByType("navigation")[0].name.endsWith("blank_page_green.html"), "navigation name is blank_page_green.html");
      var pnt = iframe.contentWindow.performance.getEntriesByType("navigation")[0];
      David Baron . unresolved

      Maybe declare `pnt` 2 lines earlier and use it in the two assertions that look at item `[0]`?

      Line 47, Patchset 5 (Latest):</html>
      David Baron . unresolved

      Better to have a newline at end of file. This removes the "No newline at end of right file" note in the diff viewer. (Windows uses newline as a line separator; Unix uses newline as a line terminator.) (But there still shouldn't be a blank line when you look at the diff -- just no "No newline at end of right file" note.)

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Guohui Deng
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement satisfiedCode-Review
      • requirement is not satisfiedNo-Unresolved-Comments
      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: I2cbb53862ff9fab08f963d9408ef65ff462e5dd7
      Gerrit-Change-Number: 5935276
      Gerrit-PatchSet: 5
      Gerrit-Owner: Guohui Deng <guohu...@microsoft.com>
      Gerrit-Reviewer: David Baron <dba...@chromium.org>
      Gerrit-Reviewer: Guohui Deng <guohu...@microsoft.com>
      Gerrit-Reviewer: Noam Rosenthal <nrose...@chromium.org>
      Gerrit-Attention: Guohui Deng <guohu...@microsoft.com>
      Gerrit-Comment-Date: Mon, 18 Nov 2024 16:15:27 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Guohui Deng (Gerrit)

      unread,
      Nov 18, 2024, 1:21:01 PM (14 days ago) Nov 18
      to David Baron, Noam Rosenthal, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, blink-revie...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, core-timi...@chromium.org
      Attention needed from David Baron and Noam Rosenthal

      Guohui Deng added 8 comments

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

      Thanks for reviewing and the guidance! I modified the CL according to the comments.
      The code-review votes are gone after my update... Looks like the CL needs approvals again. 😐

      File third_party/blink/renderer/core/dom/document_timing.h
      Line 46, Patchset 5: virtual void Trace(Visitor*) const {}
      David Baron . resolved

      You can remove `virtual` here.

      Guohui Deng

      Done

      File third_party/blink/web_tests/external/wpt/navigation-timing/nav2-test-timing-persistent.html
      Line 13, Patchset 5: var timingAttributes = [
      David Baron . resolved

      Probably `const` rather than `var`.

      Guohui Deng

      Done

      Line 20, Patchset 5: for (i in timingAttributes) {
      David Baron . resolved

      Use `for (const att of timingAttributes)` and then you can just use `att` instead of `timingAttributes[i]`. (This both switches from `for..in` to `for..of` and adds `const` to declare the variable.)

      Guohui Deng

      Done

      Line 21, Patchset 5: assert_greater_than(pnt[timingAttributes[i]], 0, description);
      David Baron . resolved
      The message for this should probly be
      ```
      `${description} ${att}`
      ```
      rather than just
      ```
      description
      ```
      Guohui Deng

      Done

      Line 26, Patchset 5: var iframe = document.createElement("iframe");
      David Baron . resolved

      probably `let` or `const` rather than `var`, both here and 9 lines below.

      Guohui Deng

      Done

      Line 33, Patchset 5: assert_equals(iframe.contentWindow.performance.getEntriesByType("navigation")[0].name, iframe.contentWindow.location.toString(), "navigation name matches the window.location");

      assert_true(iframe.contentWindow.performance.getEntriesByType("navigation")[0].name.endsWith("blank_page_green.html"), "navigation name is blank_page_green.html");
      var pnt = iframe.contentWindow.performance.getEntriesByType("navigation")[0];
      David Baron . resolved

      Maybe declare `pnt` 2 lines earlier and use it in the two assertions that look at item `[0]`?

      Guohui Deng

      Done

      Line 47, Patchset 5:</html>
      David Baron . resolved

      Better to have a newline at end of file. This removes the "No newline at end of right file" note in the diff viewer. (Windows uses newline as a line separator; Unix uses newline as a line terminator.) (But there still shouldn't be a blank line when you look at the diff -- just no "No newline at end of right file" note.)

      Guohui Deng

      Done

      Open in Gerrit

      Related details

      Attention is currently required from:
      • David Baron
      • Noam Rosenthal
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not satisfiedCode-Review
      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: I2cbb53862ff9fab08f963d9408ef65ff462e5dd7
      Gerrit-Change-Number: 5935276
      Gerrit-PatchSet: 7
      Gerrit-Owner: Guohui Deng <guohu...@microsoft.com>
      Gerrit-Reviewer: David Baron <dba...@chromium.org>
      Gerrit-Reviewer: Guohui Deng <guohu...@microsoft.com>
      Gerrit-Reviewer: Noam Rosenthal <nrose...@chromium.org>
      Gerrit-Attention: David Baron <dba...@chromium.org>
      Gerrit-Attention: Noam Rosenthal <nrose...@chromium.org>
      Gerrit-Comment-Date: Mon, 18 Nov 2024 18:20:50 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: David Baron <dba...@chromium.org>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      David Baron (Gerrit)

      unread,
      Nov 18, 2024, 3:58:14 PM (13 days ago) Nov 18
      to Guohui Deng, David Baron, Noam Rosenthal, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, blink-revie...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, core-timi...@chromium.org
      Attention needed from Guohui Deng and Noam Rosenthal

      David Baron voted Code-Review+1

      Code-Review+1
      Open in Gerrit

      Related details

      Attention is currently required from:
      • Guohui Deng
      • Noam Rosenthal
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not satisfiedCode-Review
      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: I2cbb53862ff9fab08f963d9408ef65ff462e5dd7
      Gerrit-Change-Number: 5935276
      Gerrit-PatchSet: 7
      Gerrit-Owner: Guohui Deng <guohu...@microsoft.com>
      Gerrit-Reviewer: David Baron <dba...@chromium.org>
      Gerrit-Reviewer: Guohui Deng <guohu...@microsoft.com>
      Gerrit-Reviewer: Noam Rosenthal <nrose...@chromium.org>
      Gerrit-Attention: Noam Rosenthal <nrose...@chromium.org>
      Gerrit-Attention: Guohui Deng <guohu...@microsoft.com>
      Gerrit-Comment-Date: Mon, 18 Nov 2024 20:58:04 +0000
      Gerrit-HasComments: No
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Noam Rosenthal (Gerrit)

      unread,
      Nov 18, 2024, 5:18:27 PM (13 days ago) Nov 18
      to Guohui Deng, David Baron, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, blink-revie...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, core-timi...@chromium.org
      Attention needed from Guohui Deng

      Noam Rosenthal voted Code-Review+1

      Code-Review+1
      Open in Gerrit

      Related details

      Attention is currently required from:
      • Guohui Deng
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement satisfiedCode-Review
      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: I2cbb53862ff9fab08f963d9408ef65ff462e5dd7
      Gerrit-Change-Number: 5935276
      Gerrit-PatchSet: 7
      Gerrit-Owner: Guohui Deng <guohu...@microsoft.com>
      Gerrit-Reviewer: David Baron <dba...@chromium.org>
      Gerrit-Reviewer: Guohui Deng <guohu...@microsoft.com>
      Gerrit-Reviewer: Noam Rosenthal <nrose...@chromium.org>
      Gerrit-Attention: Guohui Deng <guohu...@microsoft.com>
      Gerrit-Comment-Date: Mon, 18 Nov 2024 22:18:13 +0000
      Gerrit-HasComments: No
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      open
      diffy

      Blink W3C Test Autoroller (Gerrit)

      unread,
      Nov 18, 2024, 5:27:17 PM (13 days ago) Nov 18
      to Guohui Deng, Noam Rosenthal, David Baron, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, blink-revie...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, core-timi...@chromium.org
      Attention needed from Guohui Deng

      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/49240.

      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:
      • Guohui Deng
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement satisfiedCode-Review
      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: I2cbb53862ff9fab08f963d9408ef65ff462e5dd7
      Gerrit-Change-Number: 5935276
      Gerrit-PatchSet: 7
      Gerrit-Owner: Guohui Deng <guohu...@microsoft.com>
      Gerrit-Reviewer: David Baron <dba...@chromium.org>
      Gerrit-Reviewer: Guohui Deng <guohu...@microsoft.com>
      Gerrit-Reviewer: Noam Rosenthal <nrose...@chromium.org>
      Gerrit-CC: Blink W3C Test Autoroller <blink-w3c-te...@chromium.org>
      Gerrit-Attention: Guohui Deng <guohu...@microsoft.com>
      Gerrit-Comment-Date: Mon, 18 Nov 2024 22:27:02 +0000
      Gerrit-HasComments: No
      Gerrit-Has-Labels: No
      satisfied_requirement
      open
      diffy

      Guohui Deng (Gerrit)

      unread,
      Nov 18, 2024, 5:29:27 PM (13 days ago) Nov 18
      to Blink W3C Test Autoroller, Noam Rosenthal, David Baron, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, blink-revie...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, core-timi...@chromium.org

      Guohui Deng voted Commit-Queue+2

      Commit-Queue+2
      Open in Gerrit

      Related details

      Attention set is empty
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement satisfiedCode-Review
      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: I2cbb53862ff9fab08f963d9408ef65ff462e5dd7
      Gerrit-Change-Number: 5935276
      Gerrit-PatchSet: 7
      Gerrit-Owner: Guohui Deng <guohu...@microsoft.com>
      Gerrit-Reviewer: David Baron <dba...@chromium.org>
      Gerrit-Reviewer: Guohui Deng <guohu...@microsoft.com>
      Gerrit-Reviewer: Noam Rosenthal <nrose...@chromium.org>
      Gerrit-CC: Blink W3C Test Autoroller <blink-w3c-te...@chromium.org>
      Gerrit-Comment-Date: Mon, 18 Nov 2024 22:29:15 +0000
      Gerrit-HasComments: No
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      open
      diffy

      Chromium LUCI CQ (Gerrit)

      unread,
      Nov 18, 2024, 5:43:05 PM (13 days ago) Nov 18
      to Guohui Deng, Blink W3C Test Autoroller, Noam Rosenthal, David Baron, AyeAye, chromium...@chromium.org, blink-revie...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, core-timi...@chromium.org

      Chromium LUCI CQ submitted the change

      Change information

      Commit message:
      Put timing values of DocumentTiming in a GCed object

      So they can outlive the document, and PerformanceNavigationTiming can
      collect them.
      Bug: 40793421
      Change-Id: I2cbb53862ff9fab08f963d9408ef65ff462e5dd7
      Reviewed-by: David Baron <dba...@chromium.org>
      Commit-Queue: Guohui Deng <guohu...@microsoft.com>
      Reviewed-by: Noam Rosenthal <nrose...@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#1384608}
      Files:
      • M third_party/blink/renderer/core/dom/document_timing.cc
      • M third_party/blink/renderer/core/dom/document_timing.h
      • M third_party/blink/renderer/core/timing/performance_navigation_timing.cc
      • M third_party/blink/renderer/core/timing/performance_navigation_timing.h
      • M third_party/blink/web_tests/external/wpt/navigation-timing/nav2-test-document-replaced.html
      • A third_party/blink/web_tests/external/wpt/navigation-timing/nav2-test-timing-persistent.html
      Change size: M
      Delta: 6 files changed, 112 insertions(+), 61 deletions(-)
      Branch: refs/heads/main
      Submit Requirements:
      • requirement satisfiedCode-Review: +1 by David Baron, +1 by Noam Rosenthal
      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: I2cbb53862ff9fab08f963d9408ef65ff462e5dd7
      Gerrit-Change-Number: 5935276
      Gerrit-PatchSet: 8
      Gerrit-Owner: Guohui Deng <guohu...@microsoft.com>
      Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
      Gerrit-Reviewer: David Baron <dba...@chromium.org>
      Gerrit-Reviewer: Guohui Deng <guohu...@microsoft.com>
      Gerrit-Reviewer: Noam Rosenthal <nrose...@chromium.org>
      Gerrit-CC: Blink W3C Test Autoroller <blink-w3c-te...@chromium.org>
      open
      diffy
      satisfied_requirement

      Blink W3C Test Autoroller (Gerrit)

      unread,
      Nov 18, 2024, 6:32:58 PM (13 days ago) Nov 18
      to Chromium LUCI CQ, Guohui Deng, Noam Rosenthal, David Baron, AyeAye, chromium...@chromium.org, blink-revie...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, core-timi...@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/49240

      Open in Gerrit

      Related details

      Attention set is empty
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement satisfiedCode-Review
      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: I2cbb53862ff9fab08f963d9408ef65ff462e5dd7
      Gerrit-Change-Number: 5935276
      Gerrit-PatchSet: 8
      Gerrit-Owner: Guohui Deng <guohu...@microsoft.com>
      Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
      Gerrit-Reviewer: David Baron <dba...@chromium.org>
      Gerrit-Reviewer: Guohui Deng <guohu...@microsoft.com>
      Gerrit-Reviewer: Noam Rosenthal <nrose...@chromium.org>
      Gerrit-CC: Blink W3C Test Autoroller <blink-w3c-te...@chromium.org>
      Gerrit-Comment-Date: Mon, 18 Nov 2024 23:32:51 +0000
      Gerrit-HasComments: No
      Gerrit-Has-Labels: No
      satisfied_requirement
      open
      diffy

      Guohui Deng (Gerrit)

      unread,
      Nov 19, 2024, 11:03:01 AM (13 days ago) Nov 19