Bug 477498, Crash [@ TextRunWordCache::MakeTextRun], r+sr=roc
authormats.palmgren@bredband.net
Mon, 09 Feb 2009 12:23:38 +0200
changeset 24784 5f349409c9d5b0b5c6b8d9046e0a365110f2cf10
parent 24783 0ebeefbbdac0a7028c7e3616822fcb7f2cc36cce
child 24785 fec121504fe220d799df92abe79418a0b86ed73c
push id5243
push useropettay@mozilla.com
push dateMon, 09 Feb 2009 10:24:01 +0000
treeherdermozilla-central@5f349409c9d5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs477498
milestone1.9.2a1pre
Bug 477498, Crash [@ TextRunWordCache::MakeTextRun], r+sr=roc
gfx/thebes/src/gfxTextRunWordCache.cpp
--- a/gfx/thebes/src/gfxTextRunWordCache.cpp
+++ b/gfx/thebes/src/gfxTextRunWordCache.cpp
@@ -612,17 +612,17 @@ TextRunWordCache::MakeTextRun(const PRUn
                 // the word included at least one digit that is modified by the current
                 // bidi.numerals setting, so we must not use the cache for this word;
                 // instead, we'll create a new textRun and a DeferredWord entry pointing to it
                 PRUint32 length = i - wordStart;
                 nsAutoPtr<PRUnichar> numString;
                 numString = new PRUnichar[length];
                 for (PRUint32 j = 0; j < length; ++j) {
                     numString[j] = HandleNumberInChar(aText[wordStart+j],
-                                                      !!(wordStart+j > 0 ?
+                                                      !!(j > 0 ?
                                                           IS_ARABIC_CHAR(numString[j-1]) :
                                                           (aFlags & gfxTextRunWordCache::TEXT_INCOMING_ARABICCHAR)),
                                                       mBidiNumeral);
                 }
                 // now we make a transient textRun for the transformed word; this will not be cached
                 gfxTextRun *numRun;
                 numRun =
                     aFontGroup->MakeTextRun(numString.get(), length, aParams,
@@ -732,17 +732,17 @@ TextRunWordCache::MakeTextRun(const PRUi
         if (IsWordBoundary(ch)) {
             if (seenDigitToModify) {
                 // see parallel code in the 16-bit method above
                 PRUint32 length = i - wordStart;
                 nsAutoPtr<PRUnichar> numString;
                 numString = new PRUnichar[length];
                 for (PRUint32 j = 0; j < length; ++j) {
                     numString[j] = HandleNumberInChar(aText[wordStart+j],
-                                                      !!(wordStart+j > 0 ?
+                                                      !!(j > 0 ?
                                                           IS_ARABIC_CHAR(numString[j-1]) :
                                                           (aFlags & gfxTextRunWordCache::TEXT_INCOMING_ARABICCHAR)),
                                                       mBidiNumeral);
                 }
                 // now we make a transient textRun for the transformed word; this will not be cached
                 gfxTextRun *numRun;
                 numRun =
                     aFontGroup->MakeTextRun(numString.get(), length, aParams,