Commit fc405b49 authored by Asa Karlsson's avatar Asa Karlsson Committed by Commit Bot

Temporary SimpleFontData leaked in RemoteFontFaceSource

Fix leak in RemoteFontFaceSource where a temporary SimpleFontData
instance was not de-referenced and hence never destroyed.

The leak was introduced by the refactorings made in this commit:
https://chromium-review.googlesource.com/c/chromium/src/+/691475

Change-Id: I6473702a53e83f5fdfbe0fe84ede675c41c5ddad
Reviewed-on: https://chromium-review.googlesource.com/c/1286451Reviewed-by: default avatarAnders Ruud <andruud@chromium.org>
Reviewed-by: default avatarEric Willigers <ericwilligers@chromium.org>
Commit-Queue: Eric Willigers <ericwilligers@chromium.org>
Cr-Commit-Position: refs/heads/master@{#600654}
parent a6ceebd2
......@@ -235,9 +235,9 @@ RemoteFontFaceSource::CreateLoadingFallbackFontData(
const FontDescription& font_description) {
// This temporary font is not retained and should not be returned.
FontCachePurgePreventer font_cache_purge_preventer;
SimpleFontData* temporary_font =
FontCache::GetFontCache()->GetNonRetainedLastResortFallbackFont(
font_description);
scoped_refptr<SimpleFontData> temporary_font =
FontCache::GetFontCache()->GetLastResortFallbackFont(font_description,
kDoNotRetain);
if (!temporary_font) {
NOTREACHED();
return nullptr;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment