OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 1286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1297 } | 1297 } |
1298 | 1298 |
1299 | 1299 |
1300 void StartupSerializer::SerializeStrongReferences() { | 1300 void StartupSerializer::SerializeStrongReferences() { |
1301 Isolate* isolate = Isolate::Current(); | 1301 Isolate* isolate = Isolate::Current(); |
1302 // No active threads. | 1302 // No active threads. |
1303 CHECK_EQ(NULL, Isolate::Current()->thread_manager()->FirstThreadStateInUse()); | 1303 CHECK_EQ(NULL, Isolate::Current()->thread_manager()->FirstThreadStateInUse()); |
1304 // No active or weak handles. | 1304 // No active or weak handles. |
1305 CHECK(isolate->handle_scope_implementer()->blocks()->is_empty()); | 1305 CHECK(isolate->handle_scope_implementer()->blocks()->is_empty()); |
1306 CHECK_EQ(0, isolate->global_handles()->NumberOfWeakHandles()); | 1306 CHECK_EQ(0, isolate->global_handles()->NumberOfWeakHandles()); |
1307 CHECK_EQ(0, isolate->eternal_handles()->NumberOfHandles()); | |
1308 // We don't support serializing installed extensions. | 1307 // We don't support serializing installed extensions. |
1309 CHECK(!isolate->has_installed_extensions()); | 1308 CHECK(!isolate->has_installed_extensions()); |
1310 | 1309 |
1311 HEAP->IterateStrongRoots(this, VISIT_ONLY_STRONG); | 1310 HEAP->IterateStrongRoots(this, VISIT_ONLY_STRONG); |
1312 } | 1311 } |
1313 | 1312 |
1314 | 1313 |
1315 void PartialSerializer::Serialize(Object** object) { | 1314 void PartialSerializer::Serialize(Object** object) { |
1316 this->VisitPointer(object); | 1315 this->VisitPointer(object); |
1317 Pad(); | 1316 Pad(); |
(...skipping 539 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1857 | 1856 |
1858 bool SnapshotByteSource::AtEOF() { | 1857 bool SnapshotByteSource::AtEOF() { |
1859 if (0u + length_ - position_ > 2 * sizeof(uint32_t)) return false; | 1858 if (0u + length_ - position_ > 2 * sizeof(uint32_t)) return false; |
1860 for (int x = position_; x < length_; x++) { | 1859 for (int x = position_; x < length_; x++) { |
1861 if (data_[x] != SerializerDeserializer::nop()) return false; | 1860 if (data_[x] != SerializerDeserializer::nop()) return false; |
1862 } | 1861 } |
1863 return true; | 1862 return true; |
1864 } | 1863 } |
1865 | 1864 |
1866 } } // namespace v8::internal | 1865 } } // namespace v8::internal |
OLD | NEW |