| Index: vm/snapshot.h
|
| ===================================================================
|
| --- vm/snapshot.h (revision 14802)
|
| +++ vm/snapshot.h (working copy)
|
| @@ -482,6 +482,29 @@
|
| ObjectStore* object_store() const { return object_store_; }
|
|
|
| private:
|
| + class NoGCDuringSnapshotWriteScope : public ValueObject {
|
| + public:
|
| +#if defined(DEBUG)
|
| + NoGCDuringSnapshotWriteScope() {
|
| + Isolate::Current()->IncrementNoGCScopeDepth();
|
| + }
|
| + ~NoGCDuringSnapshotWriteScope() {
|
| + Isolate::Current()->DecrementNoGCScopeDepth();
|
| + }
|
| + void Reset() const {
|
| + Isolate::Current()->ResetNoGCScopeDepth();
|
| + }
|
| +#else // defined(DEBUG)
|
| + NoGCDuringSnapshotWriteScope() {}
|
| + ~NoGCDuringSnapshotWriteScope() {}
|
| + void Reset() const {}
|
| +#endif // defined(DEBUG)
|
| + private:
|
| + DISALLOW_COPY_AND_ASSIGN(NoGCDuringSnapshotWriteScope);
|
| + };
|
| + void ThrowIllegalArgException(const NoGCDuringSnapshotWriteScope& no_gc,
|
| + const char* msg);
|
| +
|
| Snapshot::Kind kind_;
|
| ObjectStore* object_store_; // Object store for common classes.
|
| ClassTable* class_table_; // Class table for the class index to class lookup.
|
|
|