Introduce OptimizedReturnProxy to make returning a union cheaper [chromium/src : main]

0 views
Skip to first unread message

Andrey Kosyakov (Gerrit)

unread,
12:55 PM (11 hours ago) 12:55 PM
to Michael Lippautz, Francois Pierre Doray, Nate Chapin, Chromium LUCI CQ, chromium...@chromium.org, Kentaro Hara, Raphael Kubo da Costa, blink-revie...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org

Andrey Kosyakov voted and added 2 comments

Votes added by Andrey Kosyakov

Commit-Queue+2

2 comments

Commit Message
Line 7, Patchset 4:Introduce UnionReturnProxy to make returning a union cheaper
Michael Lippautz . resolved

OptimizedReturnProxy

Andrey Kosyakov

Thanks for spotting, done!

File third_party/blink/renderer/platform/bindings/union_base.h
Line 40, Patchset 4:// heap allocation and extra dispatch over member types by performing an eager
Michael Lippautz . resolved

I guess the conversion is practically anyways always necessary? We create the union only to unwrap it in bindings somehow, right?

Andrey Kosyakov

Yes, at least as long as the method is called from bindings. This may be cumbersome if a method is also called from native code, but I guess `[implementedAs]` would be the answer in such case :-)

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: Ibe4187281525a35508cc4cdb0b4119abdf4d7a90
Gerrit-Change-Number: 7640317
Gerrit-PatchSet: 5
Gerrit-Owner: Andrey Kosyakov <ca...@chromium.org>
Gerrit-Reviewer: Andrey Kosyakov <ca...@chromium.org>
Gerrit-Reviewer: Francois Pierre Doray <fdo...@chromium.org>
Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
Gerrit-Reviewer: Nate Chapin <jap...@chromium.org>
Gerrit-CC: Kentaro Hara <har...@chromium.org>
Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
Gerrit-Comment-Date: Thu, 12 Mar 2026 16:55:14 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: Michael Lippautz <mlip...@chromium.org>
satisfied_requirement
open
diffy

Chromium LUCI CQ (Gerrit)

unread,
2:20 PM (10 hours ago) 2:20 PM
to Andrey Kosyakov, Michael Lippautz, Francois Pierre Doray, Nate Chapin, chromium...@chromium.org, Kentaro Hara, Raphael Kubo da Costa, blink-revie...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org

Chromium LUCI CQ submitted the change

Unreviewed changes

4 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.

Change information

Commit message:
Introduce OptimizedReturnProxy to make returning a union cheaper

(note methods that always return a single predetermined member type
can just directly return it and do not need to use this)
Change-Id: Ibe4187281525a35508cc4cdb0b4119abdf4d7a90
Reviewed-by: Francois Pierre Doray <fdo...@chromium.org>
Commit-Queue: Andrey Kosyakov <ca...@chromium.org>
Reviewed-by: Michael Lippautz <mlip...@chromium.org>
Reviewed-by: Nate Chapin <jap...@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1598564}
Files:
  • M third_party/blink/renderer/bindings/core/v8/is_return_type_compatible.h
  • M third_party/blink/renderer/bindings/core/v8/to_v8_traits.h
  • M third_party/blink/renderer/bindings/scripts/bind_gen/union.py
  • M third_party/blink/renderer/core/html/forms/html_form_element.cc
  • M third_party/blink/renderer/core/html/forms/html_form_element.h
  • M third_party/blink/renderer/core/html/forms/html_form_element.idl
  • M third_party/blink/renderer/platform/bindings/union_base.h
Change size: M
Delta: 7 files changed, 65 insertions(+), 7 deletions(-)
Branch: refs/heads/main
Submit Requirements:
  • requirement satisfiedCode-Review: +1 by Nate Chapin, +1 by Francois Pierre Doray, +1 by Michael Lippautz
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: Ibe4187281525a35508cc4cdb0b4119abdf4d7a90
Gerrit-Change-Number: 7640317
Gerrit-PatchSet: 6
Gerrit-Owner: Andrey Kosyakov <ca...@chromium.org>
Gerrit-Reviewer: Andrey Kosyakov <ca...@chromium.org>
Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
Gerrit-Reviewer: Francois Pierre Doray <fdo...@chromium.org>
Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
Gerrit-Reviewer: Nate Chapin <jap...@chromium.org>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages