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

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

Issue 136193004: - Properly detag the pointer before using it. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | 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/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 2605 matching lines...) Expand 10 before | Expand all | Expand 10 after
2616 writer->WriteInlinedObjectHeader(object_id); 2616 writer->WriteInlinedObjectHeader(object_id);
2617 2617
2618 // Write out the class and tags information. 2618 // Write out the class and tags information.
2619 writer->WriteIndexedObject(kStacktraceCid); 2619 writer->WriteIndexedObject(kStacktraceCid);
2620 writer->WriteIntptrValue(writer->GetObjectTags(this)); 2620 writer->WriteIntptrValue(writer->GetObjectTags(this));
2621 2621
2622 // Write out all the object pointer fields. 2622 // Write out all the object pointer fields.
2623 SnapshotWriterVisitor visitor(writer); 2623 SnapshotWriterVisitor visitor(writer);
2624 visitor.VisitPointers(from(), to()); 2624 visitor.VisitPointers(from(), to());
2625 2625
2626 writer->Write(expand_inlined_); 2626 writer->Write(ptr()->expand_inlined_);
2627 } else { 2627 } else {
2628 // Stacktraces are not allowed in other snapshot forms. 2628 // Stacktraces are not allowed in other snapshot forms.
2629 writer->SetWriteException(Exceptions::kArgument, 2629 writer->SetWriteException(Exceptions::kArgument,
2630 "Illegal argument in isolate message" 2630 "Illegal argument in isolate message"
2631 " : (object is a stacktrace)"); 2631 " : (object is a stacktrace)");
2632 } 2632 }
2633 } 2633 }
2634 2634
2635 2635
2636 RawJSRegExp* JSRegExp::ReadFrom(SnapshotReader* reader, 2636 RawJSRegExp* JSRegExp::ReadFrom(SnapshotReader* reader,
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
2746 // We do not allow objects with native fields in an isolate message. 2746 // We do not allow objects with native fields in an isolate message.
2747 writer->SetWriteException(Exceptions::kArgument, 2747 writer->SetWriteException(Exceptions::kArgument,
2748 "Illegal argument in isolate message" 2748 "Illegal argument in isolate message"
2749 " : (object is a MirrorReference)"); 2749 " : (object is a MirrorReference)");
2750 } else { 2750 } else {
2751 UNREACHABLE(); 2751 UNREACHABLE();
2752 } 2752 }
2753 } 2753 }
2754 2754
2755 } // namespace dart 2755 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698