Skip to content
Commit a42e72cd authored by Daniel Cheng's avatar Daniel Cheng Committed by Chromium LUCI CQ
Browse files

Remove use of "generic" MojoUnion::New() helper in //remoting/host

The New() method for unions has a generic-sounding name but actually
creates a union containing the first declared subtype. In general, this
behavior is non-intuitive; it can even give the impression that it
creates an empty union that doesn't contain any of its subtypes.  It is
also inefficient: many uses of the New() method immediately populate a
different subtype, so the initial allocation to hold the first declared
subtype is simply allocator churn.

For these reasons, usage of MojoUnion::New() is being phased out and
removed.

This CL was uploaded by git cl split.

R=garykac@chromium.org

Bug: 1261169
Change-Id: I006c66977676380daabecd3d61eba73063534990
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3602213


Auto-Submit: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: default avatarGary Kacmarcik <garykac@chromium.org>
Commit-Queue: Gary Kacmarcik <garykac@chromium.org>
Cr-Commit-Position: refs/heads/main@{#995407}
parent 0c0b18ac
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment