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

Side by Side Diff: runtime/vm/raw_object_snapshot.cc

Issue 12316116: Add functionality to get full stack trace when exceptions are thrown. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 10 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 "vm/bigint_operations.h" 5 #include "vm/bigint_operations.h"
6 #include "vm/object.h" 6 #include "vm/object.h"
7 #include "vm/object_store.h" 7 #include "vm/object_store.h"
8 #include "vm/snapshot.h" 8 #include "vm/snapshot.h"
9 #include "vm/symbols.h" 9 #include "vm/symbols.h"
10 #include "vm/visitor.h" 10 #include "vm/visitor.h"
(...skipping 2384 matching lines...) Expand 10 before | Expand all | Expand 10 after
2395 // There are no non object pointer fields. 2395 // There are no non object pointer fields.
2396 2396
2397 // Read all the object pointer fields. 2397 // Read all the object pointer fields.
2398 Array& array = Array::Handle(reader->isolate()); 2398 Array& array = Array::Handle(reader->isolate());
2399 array ^= reader->ReadObjectRef(); 2399 array ^= reader->ReadObjectRef();
2400 result.set_function_array(array); 2400 result.set_function_array(array);
2401 array ^= reader->ReadObjectRef(); 2401 array ^= reader->ReadObjectRef();
2402 result.set_code_array(array); 2402 result.set_code_array(array);
2403 array ^= reader->ReadObjectRef(); 2403 array ^= reader->ReadObjectRef();
2404 result.set_pc_offset_array(array); 2404 result.set_pc_offset_array(array);
2405
2406 array ^= reader->ReadObjectRef();
2407 result.set_catch_func_array(array);
2408 array ^= reader->ReadObjectRef();
2409 result.set_catch_code_array(array);
2410 array ^= reader->ReadObjectRef();
2411 result.set_catch_pc_offset_array(array);
2412
2405 return result.raw(); 2413 return result.raw();
2406 } 2414 }
2407 UNREACHABLE(); // Stacktraces are not sent in a snapshot. 2415 UNREACHABLE(); // Stacktraces are not sent in a snapshot.
2408 return Stacktrace::null(); 2416 return Stacktrace::null();
2409 } 2417 }
2410 2418
2411 2419
2412 void RawStacktrace::WriteTo(SnapshotWriter* writer, 2420 void RawStacktrace::WriteTo(SnapshotWriter* writer,
2413 intptr_t object_id, 2421 intptr_t object_id,
2414 Snapshot::Kind kind) { 2422 Snapshot::Kind kind) {
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
2525 // Write out the class and tags information. 2533 // Write out the class and tags information.
2526 writer->WriteIndexedObject(kWeakPropertyCid); 2534 writer->WriteIndexedObject(kWeakPropertyCid);
2527 writer->WriteIntptrValue(writer->GetObjectTags(this)); 2535 writer->WriteIntptrValue(writer->GetObjectTags(this));
2528 2536
2529 // Write out all the other fields. 2537 // Write out all the other fields.
2530 writer->Write<RawObject*>(ptr()->key_); 2538 writer->Write<RawObject*>(ptr()->key_);
2531 writer->Write<RawObject*>(ptr()->value_); 2539 writer->Write<RawObject*>(ptr()->value_);
2532 } 2540 }
2533 2541
2534 } // namespace dart 2542 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698