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

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

Issue 12320103: Fix for bug 6767 - Limit stack trace collection for stack overflow exceptions. (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
« runtime/vm/raw_object_snapshot.cc ('K') | « runtime/vm/snapshot.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/snapshot.h" 5 #include "vm/snapshot.h"
6 6
7 #include "platform/assert.h" 7 #include "platform/assert.h"
8 #include "vm/bigint_operations.h" 8 #include "vm/bigint_operations.h"
9 #include "vm/bootstrap.h" 9 #include "vm/bootstrap.h"
10 #include "vm/class_finalizer.h" 10 #include "vm/class_finalizer.h"
(...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after
594 if ((value <= Smi::kMaxValue) && (value >= Smi::kMinValue)) { 594 if ((value <= Smi::kMaxValue) && (value >= Smi::kMinValue)) {
595 return Smi::New(value); 595 return Smi::New(value);
596 } 596 }
597 if (kind_ == Snapshot::kFull) { 597 if (kind_ == Snapshot::kFull) {
598 return NewMint(value); 598 return NewMint(value);
599 } 599 }
600 return Mint::NewCanonical(value); 600 return Mint::NewCanonical(value);
601 } 601 }
602 602
603 603
604 RawStacktrace* SnapshotReader::NewStacktrace() {
605 ALLOC_NEW_OBJECT(Stacktrace, object_store()->stacktrace_class());
606 }
607
608
604 RawClass* SnapshotReader::LookupInternalClass(intptr_t class_header) { 609 RawClass* SnapshotReader::LookupInternalClass(intptr_t class_header) {
605 // If the header is an object Id, lookup singleton VM classes or classes 610 // If the header is an object Id, lookup singleton VM classes or classes
606 // stored in the object store. 611 // stored in the object store.
607 if (IsVMIsolateObject(class_header)) { 612 if (IsVMIsolateObject(class_header)) {
608 intptr_t class_id = GetVMIsolateObjectId(class_header); 613 intptr_t class_id = GetVMIsolateObjectId(class_header);
609 if (IsSingletonClassId(class_id)) { 614 if (IsSingletonClassId(class_id)) {
610 return isolate()->class_table()->At(class_id); // get singleton class. 615 return isolate()->class_table()->At(class_id); // get singleton class.
611 } 616 }
612 } else if (SerializedHeaderTag::decode(class_header) == kObjectId) { 617 } else if (SerializedHeaderTag::decode(class_header) == kObjectId) {
613 intptr_t class_id = SerializedHeaderData::decode(class_header); 618 intptr_t class_id = SerializedHeaderData::decode(class_header);
(...skipping 701 matching lines...) Expand 10 before | Expand all | Expand 10 after
1315 UnmarkAll(); 1320 UnmarkAll();
1316 isolate->set_long_jump_base(base); 1321 isolate->set_long_jump_base(base);
1317 } else { 1322 } else {
1318 isolate->set_long_jump_base(base); 1323 isolate->set_long_jump_base(base);
1319 ThrowException(exception_type(), exception_msg()); 1324 ThrowException(exception_type(), exception_msg());
1320 } 1325 }
1321 } 1326 }
1322 1327
1323 1328
1324 } // namespace dart 1329 } // namespace dart
OLDNEW
« runtime/vm/raw_object_snapshot.cc ('K') | « runtime/vm/snapshot.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698