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

Unified Diff: runtime/vm/exceptions.cc

Issue 11833025: Fix for issue 7757 (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: 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/deopt_instructions.cc ('k') | runtime/vm/object.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/exceptions.cc
===================================================================
--- runtime/vm/exceptions.cc (revision 16999)
+++ runtime/vm/exceptions.cc (working copy)
@@ -42,12 +42,31 @@
Smi& offset = Smi::Handle();
while (!frame->IsEntryFrame()) {
if (frame->IsDartFrame()) {
- func = frame->LookupDartFunction();
code = frame->LookupDartCode();
- offset = Smi::New(frame->pc() - code.EntryPoint());
- func_list.Add(func);
- code_list.Add(code);
- pc_offset_list.Add(offset);
+ if (code.is_optimized()) {
+ // For optimized frames, extract all the inlined functions if any
+ // into the stack trace.
+ InlinedFunctionsInDartFrameIterator optimized_frames(frame);
+ while (true) {
+ uword pc = 0;
+ func = optimized_frames.GetNextFunction(&pc);
+ if (func.IsNull()) {
+ break;
+ }
+ ASSERT(pc != 0);
+ code = func.unoptimized_code();
+ offset = Smi::New(pc - code.EntryPoint());
+ func_list.Add(func);
+ code_list.Add(code);
+ pc_offset_list.Add(offset);
+ }
+ } else {
+ offset = Smi::New(frame->pc() - code.EntryPoint());
+ func = code.function();
+ func_list.Add(func);
+ code_list.Add(code);
+ pc_offset_list.Add(offset);
+ }
if (frame->FindExceptionHandler(handler_pc)) {
*handler_sp = frame->sp();
*handler_fp = frame->fp();
« no previous file with comments | « runtime/vm/deopt_instructions.cc ('k') | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698