Bug 1132358 - Save and restore mIterGenCnt. Keep it consistent with mIter. r=mcmanus, a=lmandel
authorHenry Hu <henry.hu.sh@gmail.com>
Fri, 20 Feb 2015 15:13:39 -0500
changeset 250090 386a573b4fc0
parent 250089 97f402db19a4
child 250091 4564e0e22a37
push id4500
push userryanvm@gmail.com
push date2015-02-27 20:31 +0000
treeherdermozilla-beta@4564e0e22a37 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmcmanus, lmandel
bugs1132358
milestone37.0
Bug 1132358 - Save and restore mIterGenCnt. Keep it consistent with mIter. r=mcmanus, a=lmandel
netwerk/dns/nsDNSService2.cpp
--- a/netwerk/dns/nsDNSService2.cpp
+++ b/netwerk/dns/nsDNSService2.cpp
@@ -204,21 +204,23 @@ NS_IMETHODIMP
 nsDNSRecord::HasMore(bool *result)
 {
     if (mDone) {
         *result = false;
         return NS_OK;
     }
 
     NetAddrElement *iterCopy = mIter;
+    int iterGenCntCopy = mIterGenCnt;
 
     NetAddr addr;
     *result = NS_SUCCEEDED(GetNextAddr(0, &addr));
 
     mIter = iterCopy;
+    mIterGenCnt = iterGenCntCopy;
     mDone = false;
 
     return NS_OK;
 }
 
 NS_IMETHODIMP
 nsDNSRecord::Rewind()
 {