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:Gary Kacmarcik <garykac@chromium.org> Commit-Queue: Gary Kacmarcik <garykac@chromium.org> Cr-Commit-Position: refs/heads/main@{#995407}
Loading
Please register or sign in to comment