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

Side by Side Diff: third_party/WebKit/Source/platform/fonts/FontFallbackIterator.cpp

Issue 2707763003: Capture font-related data in minidump when last resort font failed (Closed)
Patch Set: Created 3 years, 10 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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/platform/fonts/FontCache.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "platform/fonts/FontFallbackIterator.h" 5 #include "platform/fonts/FontFallbackIterator.h"
6 6
7 #include "platform/fonts/FontCache.h" 7 #include "platform/fonts/FontCache.h"
8 #include "platform/fonts/FontDescription.h" 8 #include "platform/fonts/FontDescription.h"
9 #include "platform/fonts/FontFallbackList.h" 9 #include "platform/fonts/FontFallbackList.h"
10 #include "platform/fonts/SegmentedFontData.h" 10 #include "platform/fonts/SegmentedFontData.h"
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 109
110 // If we don't have options from the system fallback anymore or had 110 // If we don't have options from the system fallback anymore or had
111 // previously returned them, we only have the last resort font left. 111 // previously returned them, we only have the last resort font left.
112 // TODO: crbug.com/42217 Improve this by doing the last run with a last 112 // TODO: crbug.com/42217 Improve this by doing the last run with a last
113 // resort font that has glyphs for everything, for example the Unicode 113 // resort font that has glyphs for everything, for example the Unicode
114 // LastResort font, not just Times or Arial. 114 // LastResort font, not just Times or Arial.
115 FontCache* fontCache = FontCache::fontCache(); 115 FontCache* fontCache = FontCache::fontCache();
116 m_fallbackStage = OutOfLuck; 116 m_fallbackStage = OutOfLuck;
117 RefPtr<SimpleFontData> lastResort = 117 RefPtr<SimpleFontData> lastResort =
118 fontCache->getLastResortFallbackFont(m_fontDescription).get(); 118 fontCache->getLastResortFallbackFont(m_fontDescription).get();
119 RELEASE_ASSERT(lastResort); 119 if (!lastResort)
120 FontCache::crashWithFontInfo(&m_fontDescription);
120 // Don't skip the LastResort font in uniqueOrNext() since HarfBuzzShaper 121 // Don't skip the LastResort font in uniqueOrNext() since HarfBuzzShaper
121 // needs to use this one to place missing glyph boxes. 122 // needs to use this one to place missing glyph boxes.
122 return adoptRef(new FontDataForRangeSetFromCache(lastResort)); 123 return adoptRef(new FontDataForRangeSetFromCache(lastResort));
123 } 124 }
124 125
125 ASSERT(m_fallbackStage == FontGroupFonts || m_fallbackStage == SegmentedFace); 126 ASSERT(m_fallbackStage == FontGroupFonts || m_fallbackStage == SegmentedFace);
126 const FontData* fontData = 127 const FontData* fontData =
127 m_fontFallbackList->fontDataAt(m_fontDescription, m_currentFontDataIndex); 128 m_fontFallbackList->fontDataAt(m_fontDescription, m_currentFontDataIndex);
128 129
129 if (!fontData) { 130 if (!fontData) {
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 235
235 if (!hint || m_previouslyAskedForHint.contains(hint)) 236 if (!hint || m_previouslyAskedForHint.contains(hint))
236 return nullptr; 237 return nullptr;
237 m_previouslyAskedForHint.insert(hint); 238 m_previouslyAskedForHint.insert(hint);
238 return fontCache->fallbackFontForCharacter( 239 return fontCache->fallbackFontForCharacter(
239 m_fontDescription, hint, 240 m_fontDescription, hint,
240 m_fontFallbackList->primarySimpleFontData(m_fontDescription)); 241 m_fontFallbackList->primarySimpleFontData(m_fontDescription));
241 } 242 }
242 243
243 } // namespace blink 244 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/fonts/FontCache.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698