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

Unified Diff: src/snapshot/snapshot-common.cc

Issue 1287113010: Make snapshot.h usable without objects-inl.h header. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/snapshot/snapshot.h ('k') | src/snapshot/snapshot-empty.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
« no previous file with comments | « src/snapshot/snapshot.h ('k') | src/snapshot/snapshot-empty.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698