Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(669)

Unified Diff: third_party/WebKit/Source/platform/fonts/GlyphPageTreeNode.cpp

Issue 2066253002: Fix Refcount in FontDataCache for objects from FontFallbackIterator (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/fonts/GlyphPageTreeNode.cpp
diff --git a/third_party/WebKit/Source/platform/fonts/GlyphPageTreeNode.cpp b/third_party/WebKit/Source/platform/fonts/GlyphPageTreeNode.cpp
index 46238b2298d33c1da8de0b6dd175f22f0d47ceb6..fd5bc6ee35810f2acaf20ad719cde192237f36f3 100644
--- a/third_party/WebKit/Source/platform/fonts/GlyphPageTreeNode.cpp
+++ b/third_party/WebKit/Source/platform/fonts/GlyphPageTreeNode.cpp
@@ -248,8 +248,8 @@ void GlyphPageTreeNode::initializePurePage(const FontData* fontData, unsigned pa
const SegmentedFontData* segmentedFontData = toSegmentedFontData(fontData);
for (int i = segmentedFontData->numFaces() - 1; i >= 0; i--) {
- const FontDataForRangeSet& fontDataForRangeSet = segmentedFontData->faceAt(i);
- RefPtr<UnicodeRangeSet> ranges = fontDataForRangeSet.ranges();
+ RefPtr<FontDataForRangeSet> fontDataForRangeSet = segmentedFontData->faceAt(i);
+ RefPtr<UnicodeRangeSet> ranges = fontDataForRangeSet->ranges();
// If there are no ranges, that means this font should be used for
// the full codepoint range, thus running the loop once over a
// synthetic full UnicodeRange object. Otherwise we use the ranges
@@ -271,7 +271,7 @@ void GlyphPageTreeNode::initializePurePage(const FontData* fontData, unsigned pa
// If this is a custom font needs to be loaded, do not fill
// the page so that font fallback is used while loading.
- RefPtr<CustomFontData> customData = fontDataForRangeSet.fontData()->customFontData();
+ RefPtr<CustomFontData> customData = fontDataForRangeSet->fontData()->customFontData();
if (customData && customData->isLoadingFallback()) {
for (int j = from; j < to; j++) {
m_page->setCustomFontToLoad(j, customData.get());
@@ -280,7 +280,7 @@ void GlyphPageTreeNode::initializePurePage(const FontData* fontData, unsigned pa
continue;
}
- haveGlyphs |= fill(m_page.get(), from, to - from, buffer + from * (start < 0x10000 ? 1 : 2), (to - from) * (start < 0x10000 ? 1 : 2), fontDataForRangeSet.fontData());
+ haveGlyphs |= fill(m_page.get(), from, to - from, buffer + from * (start < 0x10000 ? 1 : 2), (to - from) * (start < 0x10000 ? 1 : 2), fontDataForRangeSet->fontData());
}
}
}

Powered by Google App Engine
This is Rietveld 408576698