Bug 1132358 - Save and restore mIterGenCnt. Keep it consistent with mIter. r=mcmanus, a=sledru
authorHenry Hu <henry.hu.sh@gmail.com>
Fri, 20 Feb 2015 15:13:39 -0500
changeset 245437 b20bd6385474
parent 245436 f753656b2806
child 245438 7a4c981abfb6
push id673
push userryanvm@gmail.com
push date2015-03-02 20:00 +0000
treeherdermozilla-release@608bab8e4868 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmcmanus, sledru
bugs1132358
milestone36.0
Bug 1132358 - Save and restore mIterGenCnt. Keep it consistent with mIter. r=mcmanus, a=sledru
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()
 {