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

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

Issue 14348005: Fix for issue 9617, throw a snapshot write error when encountering stacktrace objects instead of an… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 8 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 | « runtime/vm/raw_object_snapshot.cc ('k') | runtime/vm/snapshot.cc » ('j') | 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 #ifndef VM_SNAPSHOT_H_ 5 #ifndef VM_SNAPSHOT_H_
6 #define VM_SNAPSHOT_H_ 6 #define VM_SNAPSHOT_H_
7 7
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "vm/allocation.h" 9 #include "vm/allocation.h"
10 #include "vm/bitfield.h" 10 #include "vm/bitfield.h"
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 void WriteObjectImpl(RawObject* raw); 498 void WriteObjectImpl(RawObject* raw);
499 void WriteInlinedObject(RawObject* raw); 499 void WriteInlinedObject(RawObject* raw);
500 void WriteForwardedObjects(); 500 void WriteForwardedObjects();
501 void ArrayWriteTo(intptr_t object_id, 501 void ArrayWriteTo(intptr_t object_id,
502 intptr_t array_kind, 502 intptr_t array_kind,
503 intptr_t tags, 503 intptr_t tags,
504 RawSmi* length, 504 RawSmi* length,
505 RawAbstractTypeArguments* type_arguments, 505 RawAbstractTypeArguments* type_arguments,
506 RawObject* data[]); 506 RawObject* data[]);
507 void CheckIfSerializable(RawClass* cls); 507 void CheckIfSerializable(RawClass* cls);
508 void SetWriteException(Exceptions::ExceptionType type, const char* msg);
508 void WriteInstance(intptr_t object_id, 509 void WriteInstance(intptr_t object_id,
509 RawObject* raw, 510 RawObject* raw,
510 RawClass* cls, 511 RawClass* cls,
511 intptr_t tags); 512 intptr_t tags);
512 void WriteInstanceRef(RawObject* raw, RawClass* cls); 513 void WriteInstanceRef(RawObject* raw, RawClass* cls);
513 514
514 ObjectStore* object_store() const { return object_store_; } 515 ObjectStore* object_store() const { return object_store_; }
515 516
516 private: 517 private:
517 Snapshot::Kind kind_; 518 Snapshot::Kind kind_;
518 ObjectStore* object_store_; // Object store for common classes. 519 ObjectStore* object_store_; // Object store for common classes.
519 ClassTable* class_table_; // Class table for the class index to class lookup. 520 ClassTable* class_table_; // Class table for the class index to class lookup.
520 GrowableArray<ForwardObjectNode*> forward_list_; 521 GrowableArray<ForwardObjectNode*> forward_list_;
521 Exceptions::ExceptionType exception_type_; // Exception type. 522 Exceptions::ExceptionType exception_type_; // Exception type.
522 const char* exception_msg_; // Message associated with exception. 523 const char* exception_msg_; // Message associated with exception.
523 LanguageError& error_; // Error handle. 524 LanguageError& error_; // Error handle.
524 525
525 friend class RawArray; 526 friend class RawArray;
526 friend class RawClass; 527 friend class RawClass;
527 friend class RawClosureData; 528 friend class RawClosureData;
528 friend class RawGrowableObjectArray; 529 friend class RawGrowableObjectArray;
529 friend class RawImmutableArray; 530 friend class RawImmutableArray;
530 friend class RawJSRegExp; 531 friend class RawJSRegExp;
531 friend class RawLibrary; 532 friend class RawLibrary;
532 friend class RawLiteralToken; 533 friend class RawLiteralToken;
533 friend class RawScript; 534 friend class RawScript;
535 friend class RawStacktrace;
534 friend class RawTokenStream; 536 friend class RawTokenStream;
535 friend class RawTypeArguments; 537 friend class RawTypeArguments;
536 friend class SnapshotWriterVisitor; 538 friend class SnapshotWriterVisitor;
537 DISALLOW_COPY_AND_ASSIGN(SnapshotWriter); 539 DISALLOW_COPY_AND_ASSIGN(SnapshotWriter);
538 }; 540 };
539 541
540 542
541 class FullSnapshotWriter : public SnapshotWriter { 543 class FullSnapshotWriter : public SnapshotWriter {
542 public: 544 public:
543 static const intptr_t kInitialSize = 64 * KB; 545 static const intptr_t kInitialSize = 64 * KB;
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
610 private: 612 private:
611 SnapshotWriter* writer_; 613 SnapshotWriter* writer_;
612 bool as_references_; 614 bool as_references_;
613 615
614 DISALLOW_COPY_AND_ASSIGN(SnapshotWriterVisitor); 616 DISALLOW_COPY_AND_ASSIGN(SnapshotWriterVisitor);
615 }; 617 };
616 618
617 } // namespace dart 619 } // namespace dart
618 620
619 #endif // VM_SNAPSHOT_H_ 621 #endif // VM_SNAPSHOT_H_
OLDNEW
« no previous file with comments | « runtime/vm/raw_object_snapshot.cc ('k') | runtime/vm/snapshot.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698