Prevent use of base::NoDestructor for trivially-destructible types

https://chromium-review.googlesource.com/c/chromium/src/+/2998672
This commit is contained in:
deepak1556
2021-07-04 22:48:01 -07:00
parent a69cb592d1
commit 3983afda29

View File

@@ -813,14 +813,14 @@ void WebContents::InitWithSessionAndOptions(
#if defined(OS_LINUX) || defined(OS_WIN)
// Update font settings.
static const base::NoDestructor<gfx::FontRenderParams> params(
static const gfx::FontRenderParams params(
gfx::GetFontRenderParams(gfx::FontRenderParamsQuery(), nullptr));
prefs->should_antialias_text = params->antialiasing;
prefs->use_subpixel_positioning = params->subpixel_positioning;
prefs->hinting = params->hinting;
prefs->use_autohinter = params->autohinter;
prefs->use_bitmaps = params->use_bitmaps;
prefs->subpixel_rendering = params->subpixel_rendering;
prefs->should_antialias_text = params.antialiasing;
prefs->use_subpixel_positioning = params.subpixel_positioning;
prefs->hinting = params.hinting;
prefs->use_autohinter = params.autohinter;
prefs->use_bitmaps = params.use_bitmaps;
prefs->subpixel_rendering = params.subpixel_rendering;
#endif
// Honor the system's cursor blink rate settings