Support mapping V8 use counters to WebDXFeature use counters. [chromium/src : main]

0 views
Skip to first unread message

Johnny Stenback (Gerrit)

unread,
Nov 7, 2024, 1:35:54 PMNov 7
to Nate Chapin, Scott Haseley, chromium...@chromium.org, Kentaro Hara, blink-revie...@chromium.org, blink-...@chromium.org
Attention needed from Nate Chapin and Scott Haseley

Johnny Stenback added 1 comment

Patchset-level comments
File-level comment, Patchset 1 (Latest):
Johnny Stenback . resolved

Hey Nate and Scott, seems everyone's an owner of this file and I just need 2 pairs of committer eyeballs on this change... This merely adds logic to be able to map a V8 use counter to a WebDXFeature use counter in addition to the existing ability to map to a WebFeature use counter. There's now needs for that creeping up and we should have this in place...

Thanks!

Open in Gerrit

Related details

Attention is currently required from:
  • Nate Chapin
  • Scott Haseley
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: I5debe2771e6b3c794707d2aa63537b1018628387
Gerrit-Change-Number: 6002352
Gerrit-PatchSet: 1
Gerrit-Owner: Johnny Stenback <jste...@google.com>
Gerrit-Reviewer: Nate Chapin <jap...@chromium.org>
Gerrit-Reviewer: Scott Haseley <shas...@chromium.org>
Gerrit-CC: Kentaro Hara <har...@chromium.org>
Gerrit-Attention: Nate Chapin <jap...@chromium.org>
Gerrit-Attention: Scott Haseley <shas...@chromium.org>
Gerrit-Comment-Date: Thu, 07 Nov 2024 18:35:45 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Scott Haseley (Gerrit)

unread,
Nov 7, 2024, 2:56:03 PMNov 7
to Johnny Stenback, Chromium LUCI CQ, Nate Chapin, chromium...@chromium.org, Kentaro Hara, blink-revie...@chromium.org, blink-...@chromium.org
Attention needed from Johnny Stenback and Nate Chapin

Scott Haseley voted and added 2 comments

Votes added by Scott Haseley

Code-Review+1

2 comments

Patchset-level comments
Scott Haseley . resolved

lgtm w/ comment

File third_party/blink/renderer/bindings/core/v8/use_counter_callback.cc
Line 24, Patchset 1 (Latest): std::optional<WebDXFeature> webdx_feature;
Scott Haseley . unresolved

nit: Since `webdx_feature` and `deprecated` are ignored if `blink_feature` is set,
you might want to add more CHECKs below (!deprecated in webdx arm, !webdx_feature in blink feature arm) to prevent misuse.

Alternatively, you could consider enforcing the mutual exclusion with `absl::variant`, something like:

```
struct BlinkFeature {
WebFeature web_feature;
bool deprecated;
};

absl::variant<absl::monostate, BlinkFeature, WebDXFeature> feature;
```

Open in Gerrit

Related details

Attention is currently required from:
  • Johnny Stenback
  • Nate Chapin
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: I5debe2771e6b3c794707d2aa63537b1018628387
    Gerrit-Change-Number: 6002352
    Gerrit-PatchSet: 1
    Gerrit-Owner: Johnny Stenback <jste...@google.com>
    Gerrit-Reviewer: Johnny Stenback <jste...@google.com>
    Gerrit-Reviewer: Nate Chapin <jap...@chromium.org>
    Gerrit-Reviewer: Scott Haseley <shas...@chromium.org>
    Gerrit-CC: Kentaro Hara <har...@chromium.org>
    Gerrit-Attention: Nate Chapin <jap...@chromium.org>
    Gerrit-Attention: Johnny Stenback <jste...@google.com>
    Gerrit-Comment-Date: Thu, 07 Nov 2024 19:55:52 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Johnny Stenback (Gerrit)

    unread,
    Nov 11, 2024, 5:04:46 PMNov 11
    to Scott Haseley, Chromium LUCI CQ, Nate Chapin, chromium...@chromium.org, Kentaro Hara, blink-revie...@chromium.org, blink-...@chromium.org
    Attention needed from Nate Chapin and Scott Haseley

    Johnny Stenback added 1 comment

    File third_party/blink/renderer/bindings/core/v8/use_counter_callback.cc
    Line 24, Patchset 1: std::optional<WebDXFeature> webdx_feature;
    Scott Haseley . resolved

    nit: Since `webdx_feature` and `deprecated` are ignored if `blink_feature` is set,
    you might want to add more CHECKs below (!deprecated in webdx arm, !webdx_feature in blink feature arm) to prevent misuse.

    Alternatively, you could consider enforcing the mutual exclusion with `absl::variant`, something like:

    ```
    struct BlinkFeature {
    WebFeature web_feature;
    bool deprecated;
    };

    absl::variant<absl::monostate, BlinkFeature, WebDXFeature> feature;
    ```

    Johnny Stenback

    Good point! I opted for the additional CHECKs in the patch set I just uploaded.

    Cheers!

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Nate Chapin
    • Scott Haseley
    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: I5debe2771e6b3c794707d2aa63537b1018628387
    Gerrit-Change-Number: 6002352
    Gerrit-PatchSet: 2
    Gerrit-Owner: Johnny Stenback <jste...@google.com>
    Gerrit-Reviewer: Johnny Stenback <jste...@google.com>
    Gerrit-Reviewer: Nate Chapin <jap...@chromium.org>
    Gerrit-Reviewer: Scott Haseley <shas...@chromium.org>
    Gerrit-CC: Kentaro Hara <har...@chromium.org>
    Gerrit-Attention: Nate Chapin <jap...@chromium.org>
    Gerrit-Attention: Scott Haseley <shas...@chromium.org>
    Gerrit-Comment-Date: Mon, 11 Nov 2024 22:04:33 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Scott Haseley <shas...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Scott Haseley (Gerrit)

    unread,
    Nov 11, 2024, 6:06:17 PMNov 11
    to Johnny Stenback, Chromium LUCI CQ, Nate Chapin, chromium...@chromium.org, Kentaro Hara, blink-revie...@chromium.org, blink-...@chromium.org
    Attention needed from Johnny Stenback and Nate Chapin

    Scott Haseley voted and added 1 comment

    Votes added by Scott Haseley

    Code-Review+1

    1 comment

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

    LGTM

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Johnny Stenback
    • Nate Chapin
    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: I5debe2771e6b3c794707d2aa63537b1018628387
    Gerrit-Change-Number: 6002352
    Gerrit-PatchSet: 2
    Gerrit-Owner: Johnny Stenback <jste...@google.com>
    Gerrit-Reviewer: Johnny Stenback <jste...@google.com>
    Gerrit-Reviewer: Nate Chapin <jap...@chromium.org>
    Gerrit-Reviewer: Scott Haseley <shas...@chromium.org>
    Gerrit-CC: Kentaro Hara <har...@chromium.org>
    Gerrit-Attention: Nate Chapin <jap...@chromium.org>
    Gerrit-Attention: Johnny Stenback <jste...@google.com>
    Gerrit-Comment-Date: Mon, 11 Nov 2024 23:06:06 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Marja Hölttä (Gerrit)

    unread,
    Nov 12, 2024, 2:00:48 AMNov 12
    to Johnny Stenback, Scott Haseley, Chromium LUCI CQ, Nate Chapin, chromium...@chromium.org, Kentaro Hara, blink-revie...@chromium.org, blink-...@chromium.org
    Attention needed from Johnny Stenback and Nate Chapin

    Marja Hölttä added 1 comment

    Patchset-level comments
    Marja Hölttä . resolved

    Hi, could you land this so I can do the V8 use counter related changes which depend on this? Thanks!

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Johnny Stenback
    • Nate Chapin
    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: I5debe2771e6b3c794707d2aa63537b1018628387
    Gerrit-Change-Number: 6002352
    Gerrit-PatchSet: 2
    Gerrit-Owner: Johnny Stenback <jste...@google.com>
    Gerrit-Reviewer: Johnny Stenback <jste...@google.com>
    Gerrit-Reviewer: Nate Chapin <jap...@chromium.org>
    Gerrit-Reviewer: Scott Haseley <shas...@chromium.org>
    Gerrit-CC: Kentaro Hara <har...@chromium.org>
    Gerrit-CC: Marja Hölttä <ma...@chromium.org>
    Gerrit-Attention: Nate Chapin <jap...@chromium.org>
    Gerrit-Attention: Johnny Stenback <jste...@google.com>
    Gerrit-Comment-Date: Tue, 12 Nov 2024 07:00:35 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Nate Chapin (Gerrit)

    unread,
    Nov 12, 2024, 1:09:37 PMNov 12
    to Johnny Stenback, Marja Hölttä, Scott Haseley, Chromium LUCI CQ, chromium...@chromium.org, Kentaro Hara, blink-revie...@chromium.org, blink-...@chromium.org
    Attention needed from Johnny Stenback

    Nate Chapin voted Code-Review+1

    Code-Review+1
    Open in Gerrit

    Related details

    Attention is currently required from:
    • Johnny Stenback
    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: I5debe2771e6b3c794707d2aa63537b1018628387
    Gerrit-Change-Number: 6002352
    Gerrit-PatchSet: 2
    Gerrit-Owner: Johnny Stenback <jste...@google.com>
    Gerrit-Reviewer: Johnny Stenback <jste...@google.com>
    Gerrit-Reviewer: Nate Chapin <jap...@chromium.org>
    Gerrit-Reviewer: Scott Haseley <shas...@chromium.org>
    Gerrit-CC: Kentaro Hara <har...@chromium.org>
    Gerrit-CC: Marja Hölttä <ma...@chromium.org>
    Gerrit-Attention: Johnny Stenback <jste...@google.com>
    Gerrit-Comment-Date: Tue, 12 Nov 2024 18:09:24 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    open
    diffy

    Johnny Stenback (Gerrit)

    unread,
    Nov 12, 2024, 1:12:09 PMNov 12
    to Nate Chapin, Marja Hölttä, Scott Haseley, Chromium LUCI CQ, chromium...@chromium.org, Kentaro Hara, blink-revie...@chromium.org, blink-...@chromium.org

    Johnny Stenback 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: I5debe2771e6b3c794707d2aa63537b1018628387
    Gerrit-Change-Number: 6002352
    Gerrit-PatchSet: 2
    Gerrit-Owner: Johnny Stenback <jste...@google.com>
    Gerrit-Reviewer: Johnny Stenback <jste...@google.com>
    Gerrit-Reviewer: Nate Chapin <jap...@chromium.org>
    Gerrit-Reviewer: Scott Haseley <shas...@chromium.org>
    Gerrit-CC: Kentaro Hara <har...@chromium.org>
    Gerrit-CC: Marja Hölttä <ma...@chromium.org>
    Gerrit-Comment-Date: Tue, 12 Nov 2024 18:11:57 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    open
    diffy

    Chromium LUCI CQ (Gerrit)

    unread,
    Nov 12, 2024, 2:04:53 PMNov 12
    to Johnny Stenback, Nate Chapin, Marja Hölttä, Scott Haseley, chromium...@chromium.org, Kentaro Hara, blink-revie...@chromium.org, blink-...@chromium.org

    Chromium LUCI CQ submitted the change

    Change information

    Commit message:
    Support mapping V8 use counters to WebDXFeature use counters.

    This tweaks Blink's existing V8 callback for mapping V8 use counters to
    Blink use counters to support the relatively new WebDXFeature use
    counter type.
    Bug: 366475997
    Change-Id: I5debe2771e6b3c794707d2aa63537b1018628387
    Commit-Queue: Johnny Stenback <jste...@google.com>
    Reviewed-by: Scott Haseley <shas...@chromium.org>
    Reviewed-by: Nate Chapin <jap...@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1381899}
    Files:
    • M third_party/blink/renderer/bindings/core/v8/use_counter_callback.cc
    Change size: S
    Delta: 1 file changed, 16 insertions(+), 5 deletions(-)
    Branch: refs/heads/main
    Submit Requirements:
    • requirement satisfiedCode-Review: +1 by Nate Chapin, +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: I5debe2771e6b3c794707d2aa63537b1018628387
    Gerrit-Change-Number: 6002352
    Gerrit-PatchSet: 3
    Gerrit-Owner: Johnny Stenback <jste...@google.com>
    Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
    Gerrit-Reviewer: Johnny Stenback <jste...@google.com>
    Gerrit-Reviewer: Nate Chapin <jap...@chromium.org>
    Gerrit-Reviewer: Scott Haseley <shas...@chromium.org>
    open
    diffy
    satisfied_requirement
    Reply all
    Reply to author
    Forward
    0 new messages