Bug 596240: Don't front() on an empty vector. r=joe a=blocking-2.0

This commit is contained in:
Chris Jones 2010-09-20 14:40:30 -05:00
Родитель a353f81b49
Коммит 63ee66f4c9
1 изменённых файлов: 6 добавлений и 2 удалений

Просмотреть файл

@ -340,10 +340,14 @@ ShadowLayerForwarder::EndTransaction(nsTArray<EditReply>* aReplies)
NS_ABORT_IF_FALSE(nCsets > 0, "should have bailed by now");
cset.SetCapacity(nCsets);
cset.AppendElements(&mTxn->mCset.front(), mTxn->mCset.size());
if (!mTxn->mCset.empty()) {
cset.AppendElements(&mTxn->mCset.front(), mTxn->mCset.size());
}
// Paints after non-paint ops, including attribute changes. See
// above.
cset.AppendElements(&mTxn->mPaints.front(), mTxn->mPaints.size());
if (!mTxn->mPaints.empty()) {
cset.AppendElements(&mTxn->mPaints.front(), mTxn->mPaints.size());
}
MOZ_LAYERS_LOG(("[LayersForwarder] syncing before send..."));
PlatformSyncBeforeUpdate();