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

Unified Diff: src/mksnapshot.cc

Issue 949623006: Attach snapshot data blob to the isolate. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 10 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/isolate.h ('k') | src/snapshot.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mksnapshot.cc
diff --git a/src/mksnapshot.cc b/src/mksnapshot.cc
index bc18aebb695084a53b4e5730edb1a44c7092c0ec..c9b8066959fc321a25e02ac2bfdb00774d5d972e 100644
--- a/src/mksnapshot.cc
+++ b/src/mksnapshot.cc
@@ -70,11 +70,8 @@ class SnapshotWriter {
}
void WriteFileSuffix() const {
- fprintf(fp_, "const v8::StartupData Snapshot::SnapshotBlob() {\n");
- fprintf(fp_, " v8::StartupData blob;\n");
- fprintf(fp_, " blob.data = reinterpret_cast<const char*>(blob_data);\n");
- fprintf(fp_, " blob.raw_size = blob_size;\n");
- fprintf(fp_, " return blob;\n");
+ fprintf(fp_, "const v8::StartupData* Snapshot::DefaultSnapshotBlob() {\n");
+ fprintf(fp_, " return &blob;\n");
fprintf(fp_, "}\n\n");
fprintf(fp_, "} // namespace internal\n");
fprintf(fp_, "} // namespace v8\n");
@@ -85,7 +82,8 @@ class SnapshotWriter {
WriteSnapshotData(blob);
fprintf(fp_, "};\n");
fprintf(fp_, "static const int blob_size = %d;\n", blob.length());
- fprintf(fp_, "\n");
+ fprintf(fp_, "static const v8::StartupData blob =\n");
+ fprintf(fp_, "{ (const char*) blob_data, blob_size };\n");
}
void WriteSnapshotData(const i::Vector<const i::byte>& blob) const {
« no previous file with comments | « src/isolate.h ('k') | src/snapshot.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698