0

Initialize the max_per_capture_size param.

Avoids the following situations:
1. If the param is not explicitly initialized, the default value is not 0;
2. When clang compilation optimization is turned on, if the param is not initialized and a copy constructor is performed, the value of max_per_capture_size ​​in the two variables may be inconsistent

Change-Id: I29acad657a87439c77e922ce3382dc159533d724
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6332876
Reviewed-by: Calder Kitagawa <ckitagawa@chromium.org>
Reviewed-by: Yaron Friedman <yfriedman@chromium.org>
Commit-Queue: Calder Kitagawa <ckitagawa@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1433471}
This commit is contained in:
J Imagine
2025-03-17 05:53:37 -07:00
committed by Chromium LUCI CQ
parent 40ef64bd1f
commit 9c67bb62e8
2 changed files with 2 additions and 1 deletions
AUTHORS
components/paint_preview/browser

@ -538,6 +538,7 @@ Hongbo Min <hongbo.min@intel.com>
Horia Olaru <horia.olaru@gmail.com>
Horia Olaru <olaru@adobe.com>
Hosung You <hosung.you@samsung.com>
Howie Ji <imaginejhy@163.com>
Huai Wang <gkvjwa@gmail.com>
Huapeng Li <huapengl@amazon.com>
Huayong Xu <huayong.xu@samsung.com>

@ -83,7 +83,7 @@ class PaintPreviewBaseService : public KeyedService {
bool capture_links;
// Cap the perframe SkPicture size to |max_per_capture_size| if non-zero.
size_t max_per_capture_size;
size_t max_per_capture_size{0};
// Limit on the maximum size of a decoded image that can be serialized.
// Any images with a decoded size exceeding this value will be discarded.