| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "lib/stacktrace.h" | 5 #include "lib/stacktrace.h" |
| 6 #include "vm/bootstrap_natives.h" | 6 #include "vm/bootstrap_natives.h" |
| 7 #include "vm/debugger.h" | 7 #include "vm/debugger.h" |
| 8 #include "vm/exceptions.h" | 8 #include "vm/exceptions.h" |
| 9 #include "vm/native_entry.h" | 9 #include "vm/native_entry.h" |
| 10 #include "vm/object_store.h" | 10 #include "vm/object_store.h" |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 | 166 |
| 167 // Creates a StackTrace object from the current stack. | 167 // Creates a StackTrace object from the current stack. |
| 168 // | 168 // |
| 169 // Skips the first skip_frames Dart frames. | 169 // Skips the first skip_frames Dart frames. |
| 170 const StackTrace& GetCurrentStackTrace(int skip_frames) { | 170 const StackTrace& GetCurrentStackTrace(int skip_frames) { |
| 171 const GrowableObjectArray& code_list = | 171 const GrowableObjectArray& code_list = |
| 172 GrowableObjectArray::Handle(GrowableObjectArray::New()); | 172 GrowableObjectArray::Handle(GrowableObjectArray::New()); |
| 173 const GrowableObjectArray& pc_offset_list = | 173 const GrowableObjectArray& pc_offset_list = |
| 174 GrowableObjectArray::Handle(GrowableObjectArray::New()); | 174 GrowableObjectArray::Handle(GrowableObjectArray::New()); |
| 175 AppendFrames(code_list, pc_offset_list, skip_frames); | 175 AppendFrames(code_list, pc_offset_list, skip_frames); |
| 176 const Array& code_array = Array::Handle(Array::MakeFixedLength(code_list)); | 176 const Array& code_array = Array::Handle(Array::MakeArray(code_list)); |
| 177 const Array& pc_offset_array = | 177 const Array& pc_offset_array = |
| 178 Array::Handle(Array::MakeFixedLength(pc_offset_list)); | 178 Array::Handle(Array::MakeArray(pc_offset_list)); |
| 179 const StackTrace& stacktrace = | 179 const StackTrace& stacktrace = |
| 180 StackTrace::Handle(StackTrace::New(code_array, pc_offset_array)); | 180 StackTrace::Handle(StackTrace::New(code_array, pc_offset_array)); |
| 181 return stacktrace; | 181 return stacktrace; |
| 182 } | 182 } |
| 183 | 183 |
| 184 } // namespace dart | 184 } // namespace dart |
| OLD | NEW |