Bug 1385462 - Ensure GlyphRunIterator::NextRun returns false immediately if the textrun's only glyphrun does not have a valid font. r=lsalzman
authorJonathan Kew <jkew@mozilla.com>
Mon, 07 Aug 2017 17:26:08 +0100
changeset 373199 551898614c2c8e44fd249cf7f924c9e43d3eff01
parent 373198 2024c4bb1c766f5c42f428abe03b7e500e364666
child 373200 19ed20aa5c3e0962b8ed6746660cb6a5a4f14e68
push id93467
push userjkew@mozilla.com
push dateMon, 07 Aug 2017 16:28:39 +0000
treeherdermozilla-inbound@19ed20aa5c3e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerslsalzman
bugs1385462
milestone57.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1385462 - Ensure GlyphRunIterator::NextRun returns false immediately if the textrun's only glyphrun does not have a valid font. r=lsalzman
gfx/thebes/gfxTextRun.cpp
--- a/gfx/thebes/gfxTextRun.cpp
+++ b/gfx/thebes/gfxTextRun.cpp
@@ -60,17 +60,17 @@ gfxTextRun::GlyphRunIterator::NextRun()
     uint32_t glyphRunCount;
     if (mTextRun->mHasGlyphRunArray) {
         glyphRunCount = mTextRun->mGlyphRunArray.Length();
         if (mNextIndex >= glyphRunCount) {
             return false;
         }
         mGlyphRun = &mTextRun->mGlyphRunArray[mNextIndex];
     } else {
-        if (mNextIndex > 0) {
+        if (mNextIndex > 0 || !mTextRun->mSingleGlyphRun.mFont) {
             return false;
         }
         glyphRunCount = 1;
         mGlyphRun = &mTextRun->mSingleGlyphRun;
     }
 
     if (mGlyphRun->mCharacterOffset >= mEndOffset) {
         return false;