fix: ensure snapshot is valid (#48101)

This commit is contained in:
Samuel Attard
2025-08-18 14:35:58 -07:00
committed by GitHub
parent 3770bb31a7
commit fdf29ce838
5 changed files with 144 additions and 1 deletions

View File

@@ -518,6 +518,10 @@ source_set("electron_lib") {
"//v8:v8_libplatform",
]
if (v8_use_external_startup_data && use_v8_context_snapshot) {
deps += [ ":mksnapshot_checksum_gen" ]
}
public_deps = [
"//base",
"//base:i18n",
@@ -772,6 +776,18 @@ source_set("electron_lib") {
}
}
action("mksnapshot_checksum_gen") {
script = "build/checksum_header.py"
outputs = [ "$target_gen_dir/snapshot_checksum.h" ]
inputs = [ "$root_out_dir/$v8_context_snapshot_filename" ]
args = rebase_path(inputs)
args += rebase_path(outputs)
deps = [ "//tools/v8_context_snapshot" ]
}
electron_paks("packed_resources") {
if (is_mac) {
output_dir = "$root_gen_dir/electron_repack"