@@ -1357,9 +1357,11 @@ StartupData SerializeNodeContextInternalFields(Local<Object> holder,
|
1357 | 1357 | // To serialize the type field, save data in a EmbedderTypeInfo. |
1358 | 1358 | if (index == BaseObject::kEmbedderType) { |
1359 | 1359 | int size = sizeof(EmbedderTypeInfo); |
1360 | | -char* data = new char[size]; |
1361 | 1360 | // We need to use placement new because V8 calls delete[] on the returned |
1362 | 1361 | // data. |
| 1362 | +// The () syntax at the end would zero-initialize the block and make |
| 1363 | +// the padding reproducible. |
| 1364 | +char* data = new char[size](); |
1363 | 1365 | // TODO(joyeecheung): support cppgc objects. |
1364 | 1366 | new (data) EmbedderTypeInfo(obj->type(), |
1365 | 1367 | EmbedderTypeInfo::MemoryMode::kBaseObject); |
|