Bug 823887: Correctly do a pre-increment on InlineFrameIterator, r=nbp
authorHannes Verschore <hv1989@gmail.com>
Mon, 24 Dec 2012 11:57:13 +0100
changeset 126099 e097dd1a2c38bc7a63430bb7163ab1a51d5d0f8a
parent 126097 dc2abccc2adb0fd61b6f579436e7706cccf41e03
child 126100 7192d0dae605a7b24bf4871a1fac2df0fad13ab8
push id2151
push userlsblakk@mozilla.com
push dateTue, 19 Feb 2013 18:06:57 +0000
treeherdermozilla-beta@4952e88741ec [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnbp
bugs823887
milestone20.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 823887: Correctly do a pre-increment on InlineFrameIterator, r=nbp
js/src/ion/IonFrameIterator.h
js/src/ion/IonFrames.cpp
--- a/js/src/ion/IonFrameIterator.h
+++ b/js/src/ion/IonFrameIterator.h
@@ -300,17 +300,17 @@ class InlineFrameIterator
     }
     SnapshotIterator snapshotIterator() const {
         return si_;
     }
     bool isFunctionFrame() const;
     bool isConstructing() const;
     JSObject *scopeChain() const;
     JSObject *thisObject() const;
-    InlineFrameIterator operator++();
+    InlineFrameIterator &operator++();
 
     void dump() const;
 };
 
 } // namespace ion
 } // namespace js
 
 #endif // jsion_frames_iterator_h__
--- a/js/src/ion/IonFrames.cpp
+++ b/js/src/ion/IonFrames.cpp
@@ -943,22 +943,21 @@ InlineFrameIterator::findNextFrame()
         callee_ = funval.toObject().toFunction();
         script_ = callee_->nonLazyScript();
         pc_ = script_->code + si_.pcOffset();
     }
 
     framesRead_++;
 }
 
-InlineFrameIterator
+InlineFrameIterator &
 InlineFrameIterator::operator++()
 {
-    InlineFrameIterator iter(*this);
     findNextFrame();
-    return iter;
+    return *this;
 }
 
 bool
 InlineFrameIterator::isFunctionFrame() const
 {
     return !!callee_;
 }