Index: src/snapshot/snapshot-common.cc |
diff --git a/src/snapshot/snapshot-common.cc b/src/snapshot/snapshot-common.cc |
index 5a849f63b49f6407c9ac4b63a4de4f09a2be3e21..0b7e11d1ec4a0f225e88d9d5a2bce331ad2cb222 100644 |
--- a/src/snapshot/snapshot-common.cc |
+++ b/src/snapshot/snapshot-common.cc |
@@ -21,6 +21,13 @@ bool Snapshot::SnapshotIsValid(v8::StartupData* snapshot_blob) { |
#endif // DEBUG |
+bool Snapshot::HaveASnapshotToStartFrom(Isolate* isolate) { |
+ // Do not use snapshots if the isolate is used to create snapshots. |
+ return isolate->snapshot_blob() != NULL && |
+ isolate->snapshot_blob()->data != NULL; |
+} |
+ |
+ |
bool Snapshot::EmbedsScript(Isolate* isolate) { |
if (!isolate->snapshot_available()) return false; |
return ExtractMetadata(isolate->snapshot_blob()).embeds_script(); |