mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 719878 - AllFramesIter does not find all frames when the current segment contains only a native call (r=sfink)
--HG-- extra : rebase_source : c9f22d1ee0e2aa0501ad90ffe51a7ed1c13f9f33
This commit is contained in:
parent
cc4b34030c
commit
ddf14cd886
@ -1122,22 +1122,27 @@ StackIter::operator==(const StackIter &rhs) const
|
||||
AllFramesIter::AllFramesIter(StackSpace &space)
|
||||
: seg_(space.seg_),
|
||||
fp_(seg_ ? seg_->maybefp() : NULL)
|
||||
{}
|
||||
{
|
||||
settle();
|
||||
}
|
||||
|
||||
AllFramesIter&
|
||||
AllFramesIter::operator++()
|
||||
{
|
||||
JS_ASSERT(!done());
|
||||
fp_ = fp_->prev();
|
||||
if (!seg_->contains(fp_)) {
|
||||
seg_ = seg_->prevInMemory();
|
||||
while (seg_) {
|
||||
fp_ = seg_->maybefp();
|
||||
if (fp_)
|
||||
return *this;
|
||||
seg_ = seg_->prevInMemory();
|
||||
}
|
||||
JS_ASSERT(!fp_);
|
||||
}
|
||||
settle();
|
||||
return *this;
|
||||
}
|
||||
|
||||
void
|
||||
AllFramesIter::settle()
|
||||
{
|
||||
while (seg_ && (!fp_ || !seg_->contains(fp_))) {
|
||||
seg_ = seg_->prevInMemory();
|
||||
fp_ = seg_ ? seg_->maybefp() : NULL;
|
||||
}
|
||||
|
||||
JS_ASSERT(!!seg_ == !!fp_);
|
||||
JS_ASSERT_IF(fp_, seg_->contains(fp_));
|
||||
}
|
||||
|
@ -1576,6 +1576,7 @@ class AllFramesIter
|
||||
StackFrame *fp() const { return fp_; }
|
||||
|
||||
private:
|
||||
void settle();
|
||||
StackSegment *seg_;
|
||||
StackFrame *fp_;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user