@@ -59,11 +59,13 @@ namespace node {
59
59
60
60
static const char blob_data[] = {
61
61
)" ;
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 );
63
65
ss << R"( };
64
66
65
67
static const int blob_size = )"
66
- << data->blob .raw_size << R"( ;
68
+ << data->v8_snapshot_blob_data .raw_size << R"( ;
67
69
68
70
SnapshotData snapshot_data {
69
71
// -- blob begins --
@@ -103,7 +105,8 @@ const std::vector<intptr_t>& SnapshotBuilder::CollectExternalReferences() {
103
105
void SnapshotBuilder::InitializeIsolateParams (const SnapshotData* data,
104
106
Isolate::CreateParams* params) {
105
107
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 ));
107
110
}
108
111
109
112
void SnapshotBuilder::Generate (SnapshotData* out,
@@ -153,7 +156,7 @@ void SnapshotBuilder::Generate(SnapshotData* out,
153
156
// without breaking compatibility.
154
157
{
155
158
size_t index = creator.AddContext (CreateBaseContext ());
156
- CHECK_EQ (index , SnapshotBuilder ::kNodeBaseContextIndex );
159
+ CHECK_EQ (index , SnapshotData ::kNodeBaseContextIndex );
157
160
}
158
161
159
162
// The main instance context.
@@ -222,17 +225,17 @@ void SnapshotBuilder::Generate(SnapshotData* out,
222
225
// Serialize the context
223
226
size_t index = creator.AddContext (
224
227
main_context, {SerializeNodeContextInternalFields, env});
225
- CHECK_EQ (index , SnapshotBuilder ::kNodeMainContextIndex );
228
+ CHECK_EQ (index , SnapshotData ::kNodeMainContextIndex );
226
229
}
227
230
}
228
231
229
232
// Must be out of HandleScope
230
- out->blob =
233
+ out->v8_snapshot_blob_data =
231
234
creator.CreateBlob (SnapshotCreator::FunctionCodeHandling::kClear );
232
235
233
236
// We must be able to rehash the blob when we restore it or otherwise
234
237
// the hash seed would be fixed by V8, introducing a vulnerability.
235
- CHECK (out->blob .CanBeRehashed ());
238
+ CHECK (out->v8_snapshot_blob_data .CanBeRehashed ());
236
239
237
240
// We cannot resurrect the handles from the snapshot, so make sure that
238
241
// no handles are left open in the environment after the blob is created
@@ -260,7 +263,7 @@ std::string SnapshotBuilder::Generate(
260
263
SnapshotData data;
261
264
Generate (&data, args, exec_args);
262
265
std::string result = FormatBlob (&data);
263
- delete[] data.blob .data ;
266
+ delete[] data.v8_snapshot_blob_data .data ;
264
267
return result;
265
268
}
266
269
0 commit comments