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

Unified Diff: src/snapshot.h

Issue 789213002: Extract non-IO part of mksnapshot into an API method. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix external snapshot Created 6 years 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/mksnapshot.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 d37b50aebe02f44e363eb5f22efd16d846ebb6d3..25a07cdd97766eeadf00798fc8b38573a9910cad 100644
--- a/src/snapshot.h
+++ b/src/snapshot.h
@@ -10,7 +10,7 @@
namespace v8 {
namespace internal {
-class Snapshot {
+class Snapshot : public AllStatic {
public:
// Initialize the Isolate from the internal snapshot. Returns false if no
// snapshot could be found.
@@ -18,12 +18,18 @@ class Snapshot {
// Create a new context using the internal partial snapshot.
static Handle<Context> NewContextFromSnapshot(Isolate* isolate);
- static const Vector<const byte> StartupSnapshot();
- static const Vector<const byte> ContextSnapshot();
static bool HaveASnapshotToStartFrom();
+ // To be implemented by the snapshot source.
static const v8::StartupData SnapshotBlob();
+ static v8::StartupData CreateSnapshotBlob(
+ const Vector<const byte> startup_data,
+ const Vector<const byte> context_data);
+
+ static Vector<const byte> ExtractStartupData(const v8::StartupData* data);
+ static Vector<const byte> ExtractContextData(const v8::StartupData* data);
+
private:
DISALLOW_IMPLICIT_CONSTRUCTORS(Snapshot);
};
« no previous file with comments | « src/mksnapshot.cc ('k') | src/snapshot-common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698