Bug 1279814 - Update mIsoRunLast index when handling PDI. r=xidorn
authorJonathan Kew <jkew@mozilla.com>
Wed, 15 Jun 2016 22:04:48 +0100
changeset 301924 5fcd5742e51897a469773c538098d9edb4dd4c57
parent 301923 dc371921454fce21f7a34952d555bb6ede873e3c
child 301925 672fff99c00a78326f26e26ea89c8f4590040303
push id30343
push usercbook@mozilla.com
push dateThu, 16 Jun 2016 07:07:13 +0000
treeherdermozilla-central@6b40db156570 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersxidorn
bugs1279814
milestone50.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 1279814 - Update mIsoRunLast index when handling PDI. r=xidorn
layout/base/nsBidi.cpp
--- a/layout/base/nsBidi.cpp
+++ b/layout/base/nsBidi.cpp
@@ -648,17 +648,18 @@ nsBidi::BracketData::ProcessLRI_RLI(nsBi
     GET_LR_FROM_LEVEL(aLevel);
   currIsoRun.contextPos = 0;
 }
 
 /* PDI */
 void
 nsBidi::BracketData::ProcessPDI()
 {
-  mIsoRuns[mIsoRunLast].lastBase = O_N;
+  MOZ_ASSERT(mIsoRunLast > 0);
+  mIsoRuns[--mIsoRunLast].lastBase = O_N;
 }
 
 /* newly found opening bracket: create an openings entry */
 bool                            /* return true if success */
 nsBidi::BracketData::AddOpening(char16_t aMatch, int32_t aPosition)
 {
   IsoRun& lastIsoRun = mIsoRuns[mIsoRunLast];
   if (lastIsoRun.limit >= mOpeningsCount) {  /* no available new entry */