Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(129)

Unified Diff: runtime/vm/stack_frame.h

Issue 12079071: Fix a crash bug when creating a stack trace from an optimized frame. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: refactored iterator Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/exceptions.cc ('k') | runtime/vm/stack_frame.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/stack_frame.h
===================================================================
--- runtime/vm/stack_frame.h (revision 17840)
+++ runtime/vm/stack_frame.h (working copy)
@@ -229,17 +229,39 @@
// Iterator for iterating over all inlined dart functions in an optimized
// dart frame (the iteration includes the function that is inlining the
// other functions).
-class InlinedFunctionsInDartFrameIterator : public ValueObject {
+class InlinedFunctionsIterator : public ValueObject {
public:
- explicit InlinedFunctionsInDartFrameIterator(StackFrame* frame);
- RawFunction* GetNextFunction(uword* pc);
+ explicit InlinedFunctionsIterator(StackFrame* frame);
+ bool Done() const { return index_ == -1; }
+ void Advance();
+ RawFunction* function() const {
+ ASSERT(!Done());
+ return function_.raw();
+ }
+
+ uword pc() const {
+ ASSERT(!Done());
+ return pc_;
+ }
+
+ RawCode* code() const {
+ ASSERT(!Done());
+ return code_.raw();
+ }
+
private:
+ void SetDone() { index_ = -1; }
+
intptr_t index_;
+ Code& code_;
+ DeoptInfo& deopt_info_;
+ Function& function_;
+ uword pc_;
GrowableArray<DeoptInstr*> deopt_instructions_;
Array& object_table_;
- DISALLOW_COPY_AND_ASSIGN(InlinedFunctionsInDartFrameIterator);
+ DISALLOW_COPY_AND_ASSIGN(InlinedFunctionsIterator);
};
} // namespace dart
« no previous file with comments | « runtime/vm/exceptions.cc ('k') | runtime/vm/stack_frame.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698