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

Unified Diff: src/snapshot.h

Issue 328693003: Revert "Support external startup data in V8." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix brace. Created 6 years, 6 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/serialize.cc ('k') | src/snapshot-common.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/snapshot.h
diff --git a/src/snapshot.h b/src/snapshot.h
index b785cf57008999f622b1d466314e9239a76a2f67..17191f0be13c476c55a3f8daf9beb75eb19c21a2 100644
--- a/src/snapshot.h
+++ b/src/snapshot.h
@@ -12,16 +12,23 @@ namespace internal {
class Snapshot {
public:
- // Initialize the VM from the internal snapshot. Returns false if no snapshot
+ // Initialize the VM from the given snapshot file. If snapshot_file is
+ // NULL, use the internal snapshot instead. Returns false if no snapshot
// could be found.
- static bool Initialize();
+ static bool Initialize(const char* snapshot_file = NULL);
static bool HaveASnapshotToStartFrom();
// Create a new context using the internal partial snapshot.
static Handle<Context> NewContextFromSnapshot(Isolate* isolate);
- // These methods support COMPRESS_STARTUP_DATA_BZ2.
+ // Returns whether or not the snapshot is enabled.
+ static bool IsEnabled() { return size_ != 0; }
+
+ // Write snapshot to the given file. Returns true if snapshot was written
+ // successfully.
+ static bool WriteToFile(const char* snapshot_file);
+
static const byte* data() { return data_; }
static int size() { return size_; }
static int raw_size() { return raw_size_; }
@@ -65,10 +72,6 @@ class Snapshot {
DISALLOW_IMPLICIT_CONSTRUCTORS(Snapshot);
};
-#ifdef V8_USE_EXTERNAL_STARTUP_DATA
-void SetSnapshotFromFile(StartupData* snapshot_blob);
-#endif
-
} } // namespace v8::internal
#endif // V8_SNAPSHOT_H_
« no previous file with comments | « src/serialize.cc ('k') | src/snapshot-common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698