commit | 0332431525a242933d6534e8ef31c8ce78fb42c5 | [log] [tgz] |
---|---|---|
author | David Benjamin <davidben@chromium.org> | Wed Dec 13 00:10:51 2023 |
committer | Chromium LUCI CQ <chromium-scoped@luci-project-accounts.iam.gserviceaccount.com> | Wed Dec 13 00:10:51 2023 |
tree | 7cec6a2c8bfda2a7fff060ff7a0be631aa7c3a26 | |
parent | 87bf52430377c856d881dc1cd973732962c8b6b4 [diff] |
Default initialize all fields of PartialTranslateRequest The unit tests create a PartialTranslateRequest without filling in all the fields. This is fine for the string types, which are default, initialized, but bool is not. Default-initialize everything, so we don't need to risk problems with uninitialized fields. This fixes the following UBSan error: https://luci-milo.appspot.com/ui/inv/build-8761892290068215089/test-results?q=PartialTranslateManagerTest.CreateResponse&sortby=&groupby= While I'm here, I noticed an unnecessary copy of PartialTranslateRequest. Fix that by using a const reference. Bug: 1394755 Change-Id: I100441f28b2266afa22f546c01e258c3c2b2c51f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5116946 Auto-Submit: David Benjamin <davidben@chromium.org> Commit-Queue: David Benjamin <davidben@chromium.org> Commit-Queue: Ian Wells <iwells@chromium.org> Reviewed-by: Ian Wells <iwells@chromium.org> Cr-Commit-Position: refs/heads/main@{#1236669}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
To check out the source code locally, don't use git clone
! Instead, follow the instructions on how to get the code.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .
For historical reasons, there are some small top level directories. Now the guidance is that new top level directories are for product (e.g. Chrome, Android WebView, Ash). Even if these products have multiple executables, the code should be in subdirectories of the product.
If you found a bug, please file it at https://crbug.com/new.