@@ -59,11 +59,13 @@ namespace node {
5959
6060static const char blob_data[] = {
6161)" ;
62- WriteVector (&ss, data->blob .data , data->blob .raw_size );
62+ WriteVector (&ss,
63+ data->v8_snapshot_blob_data .data ,
64+ data->v8_snapshot_blob_data .raw_size );
6365 ss << R"( };
6466
6567static const int blob_size = )"
66- << data->blob .raw_size << R"( ;
68+ << data->v8_snapshot_blob_data .raw_size << R"( ;
6769
6870SnapshotData snapshot_data {
6971 // -- blob begins --
@@ -103,7 +105,8 @@ const std::vector<intptr_t>& SnapshotBuilder::CollectExternalReferences() {
103105void SnapshotBuilder::InitializeIsolateParams (const SnapshotData* data,
104106 Isolate::CreateParams* params) {
105107 params->external_references = CollectExternalReferences ().data ();
106- params->snapshot_blob = const_cast <v8::StartupData*>(&(data->blob ));
108+ params->snapshot_blob =
109+ const_cast <v8::StartupData*>(&(data->v8_snapshot_blob_data ));
107110}
108111
109112void SnapshotBuilder::Generate (SnapshotData* out,
@@ -153,7 +156,7 @@ void SnapshotBuilder::Generate(SnapshotData* out,
153156 // without breaking compatibility.
154157 {
155158 size_t index = creator.AddContext (CreateBaseContext ());
156- CHECK_EQ (index, SnapshotBuilder ::kNodeBaseContextIndex );
159+ CHECK_EQ (index, SnapshotData ::kNodeBaseContextIndex );
157160 }
158161
159162 // The main instance context.
@@ -222,17 +225,17 @@ void SnapshotBuilder::Generate(SnapshotData* out,
222225 // Serialize the context
223226 size_t index = creator.AddContext (
224227 main_context, {SerializeNodeContextInternalFields, env});
225- CHECK_EQ (index, SnapshotBuilder ::kNodeMainContextIndex );
228+ CHECK_EQ (index, SnapshotData ::kNodeMainContextIndex );
226229 }
227230 }
228231
229232 // Must be out of HandleScope
230- out->blob =
233+ out->v8_snapshot_blob_data =
231234 creator.CreateBlob (SnapshotCreator::FunctionCodeHandling::kClear );
232235
233236 // We must be able to rehash the blob when we restore it or otherwise
234237 // the hash seed would be fixed by V8, introducing a vulnerability.
235- CHECK (out->blob .CanBeRehashed ());
238+ CHECK (out->v8_snapshot_blob_data .CanBeRehashed ());
236239
237240 // We cannot resurrect the handles from the snapshot, so make sure that
238241 // no handles are left open in the environment after the blob is created
@@ -260,7 +263,7 @@ std::string SnapshotBuilder::Generate(
260263 SnapshotData data;
261264 Generate (&data, args, exec_args);
262265 std::string result = FormatBlob (&data);
263- delete[] data.blob .data ;
266+ delete[] data.v8_snapshot_blob_data .data ;
264267 return result;
265268}
266269
0 commit comments