| Index: src/d8.cc
|
| diff --git a/src/d8.cc b/src/d8.cc
|
| index e18f2da91d1a03ccdba7e5de40a00c3d86127f71..a30e454b840b1d8e703d98e1820a95cb2ff0da31 100644
|
| --- a/src/d8.cc
|
| +++ b/src/d8.cc
|
| @@ -1565,6 +1565,11 @@ class StartupDataHandler {
|
| delete[] snapshot_.data;
|
| }
|
|
|
| + void SetSnapshotOnly(const char* snapshot_blob) {
|
| + Load(snapshot_blob, &snapshot_, v8::V8::SetSnapshotDataBlob);
|
| + }
|
| +
|
| +
|
| private:
|
| void Load(const char* blob_file,
|
| v8::StartupData* startup_data,
|
| @@ -1619,6 +1624,11 @@ int Shell::Main(int argc, char* argv[]) {
|
| #endif // defined(_MSC_VER)
|
| #endif // defined(_WIN32) || defined(_WIN64)
|
| if (!SetOptions(argc, argv)) return 1;
|
| +
|
| + i::FLAG_harmony_shipping = false;
|
| + i::FLAG_random_seed = 314159265;
|
| +
|
| + i::CpuFeatures::Probe(true);
|
| v8::V8::InitializeICU(options.icu_data_file);
|
| v8::Platform* platform = v8::platform::CreateDefaultPlatform();
|
| v8::V8::InitializePlatform(platform);
|
| @@ -1652,7 +1662,12 @@ int Shell::Main(int argc, char* argv[]) {
|
| base::SysInfo::AmountOfVirtualMemory(),
|
| base::SysInfo::NumberOfProcessors());
|
| #endif
|
| + i::FLAG_logfile_per_isolate = false;
|
| + create_params.enable_serializer = true;
|
| Isolate* isolate = Isolate::New(create_params);
|
| + v8::V8::CreateSnapshotFromHeap(isolate, NULL, NULL, "snapshot.bin", NULL,
|
| + "snapshot.cc");
|
| + startup_data.SetSnapshotOnly("snapshot.bin");
|
| DumbLineEditor dumb_line_editor(isolate);
|
| {
|
| Isolate::Scope scope(isolate);
|
|
|