| Index: src/frames-inl.h
|
| ===================================================================
|
| --- src/frames-inl.h (revision 7511)
|
| +++ src/frames-inl.h (working copy)
|
| @@ -88,6 +88,11 @@
|
| }
|
|
|
|
|
| +inline StackFrame::StackFrame(StackFrameIterator* iterator)
|
| + : iterator_(iterator), isolate_(iterator_->isolate()) {
|
| +}
|
| +
|
| +
|
| inline StackHandler* StackFrame::top_handler() const {
|
| return iterator_->handler();
|
| }
|
| @@ -168,6 +173,13 @@
|
|
|
|
|
| template<typename Iterator>
|
| +inline JavaScriptFrameIteratorTemp<Iterator>::JavaScriptFrameIteratorTemp(
|
| + Isolate* isolate)
|
| + : iterator_(isolate) {
|
| + if (!done()) Advance();
|
| +}
|
| +
|
| +template<typename Iterator>
|
| inline JavaScriptFrame* JavaScriptFrameIteratorTemp<Iterator>::frame() const {
|
| // TODO(1233797): The frame hierarchy needs to change. It's
|
| // problematic that we can't use the safe-cast operator to cast to
|
| @@ -181,11 +193,9 @@
|
|
|
| template<typename Iterator>
|
| JavaScriptFrameIteratorTemp<Iterator>::JavaScriptFrameIteratorTemp(
|
| - StackFrame::Id id) {
|
| - while (!done()) {
|
| - Advance();
|
| - if (frame()->id() == id) return;
|
| - }
|
| + Isolate* isolate, StackFrame::Id id)
|
| + : iterator_(isolate) {
|
| + AdvanceToId(id);
|
| }
|
|
|
|
|
| @@ -206,6 +216,15 @@
|
|
|
|
|
| template<typename Iterator>
|
| +void JavaScriptFrameIteratorTemp<Iterator>::AdvanceToId(StackFrame::Id id) {
|
| + while (!done()) {
|
| + Advance();
|
| + if (frame()->id() == id) return;
|
| + }
|
| +}
|
| +
|
| +
|
| +template<typename Iterator>
|
| void JavaScriptFrameIteratorTemp<Iterator>::Reset() {
|
| iterator_.Reset();
|
| if (!done()) Advance();
|
|
|