| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 1e01bdc commit eef3030
4 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -320,7 +320,6 @@ std::ostream& operator<<(std::ostream& output, const SnapshotMetadata& i) { | |||
| 320 | 320 | << " \"" << i.node_version << "\", // node_version\n" | |
| 321 | 321 | << " \"" << i.node_arch << "\", // node_arch\n" | |
| 322 | 322 | << " \"" << i.node_platform << "\", // node_platform\n" | |
| 323 | - << " " << i.v8_cache_version_tag << ", // v8_cache_version_tag\n" | ||
| 324 | 323 | << " " << i.flags << ", // flags\n" | |
| 325 | 324 | << "}"; | |
| 326 | 325 | return output; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -549,8 +549,6 @@ struct SnapshotMetadata { | |||
| 549 | 549 | std::string node_version; | |
| 550 | 550 | std::string node_arch; | |
| 551 | 551 | std::string node_platform; | |
| 552 | - // Result of v8::ScriptCompiler::CachedDataVersionTag(). | ||
| 553 | - uint32_t v8_cache_version_tag; | ||
| 554 | 552 | SnapshotFlags flags; | |
| 555 | 553 | }; | |
| 556 | 554 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -43,7 +43,6 @@ using v8::Isolate; | |||
| 43 | 43 | using v8::Local; | |
| 44 | 44 | using v8::Object; | |
| 45 | 45 | using v8::ObjectTemplate; | |
| 46 | - using v8::ScriptCompiler; | ||
| 47 | 46 | using v8::SnapshotCreator; | |
| 48 | 47 | using v8::StartupData; | |
| 49 | 48 | using v8::String; | |
@@ -542,7 +541,6 @@ SnapshotMetadata SnapshotDeserializer::Read() { | |||
| 542 | 541 | result.node_version = ReadString(); | |
| 543 | 542 | result.node_arch = ReadString(); | |
| 544 | 543 | result.node_platform = ReadString(); | |
| 545 | - result.v8_cache_version_tag = ReadArithmetic<uint32_t>(); | ||
| 546 | 544 | result.flags = static_cast<SnapshotFlags>(ReadArithmetic<uint32_t>()); | |
| 547 | 545 | ||
| 548 | 546 | if (is_debug) { | |
@@ -570,9 +568,6 @@ size_t SnapshotSerializer::Write(const SnapshotMetadata& data) { | |||
| 570 | 568 | written_total += WriteString(data.node_arch); | |
| 571 | 569 | Debug("Write Node.js platform %s\n", data.node_platform); | |
| 572 | 570 | written_total += WriteString(data.node_platform); | |
| 573 | - Debug("Write V8 cached data version tag %" PRIx32 "\n", | ||
| 574 | - data.v8_cache_version_tag); | ||
| 575 | - written_total += WriteArithmetic<uint32_t>(data.v8_cache_version_tag); | ||
| 576 | 571 | Debug("Write snapshot flags %" PRIx32 "\n", | |
| 577 | 572 | static_cast<uint32_t>(data.flags)); | |
| 578 | 573 | written_total += WriteArithmetic<uint32_t>(static_cast<uint32_t>(data.flags)); | |
@@ -697,23 +692,6 @@ bool SnapshotData::Check() const { | |||
| 697 | 692 | return false; | |
| 698 | 693 | } | |
| 699 | 694 | ||
| 700 | - if (metadata.type == SnapshotMetadata::Type::kFullyCustomized && | ||
| 701 | - !WithoutCodeCache(metadata.flags)) { | ||
| 702 | - uint32_t current_cache_version = v8::ScriptCompiler::CachedDataVersionTag(); | ||
| 703 | - if (metadata.v8_cache_version_tag != current_cache_version) { | ||
| 704 | - // For now we only do this check for the customized snapshots - we know | ||
| 705 | - // that the flags we use in the default snapshot are limited and safe | ||
| 706 | - // enough so we can relax the constraints for it. | ||
| 707 | - fprintf(stderr, | ||
| 708 | - "Failed to load the startup snapshot because it was built with " | ||
| 709 | - "a different version of V8 or with different V8 configurations.\n" | ||
| 710 | - "Expected tag %" PRIx32 ", read %" PRIx32 "\n", | ||
| 711 | - current_cache_version, | ||
| 712 | - metadata.v8_cache_version_tag); | ||
| 713 | - return false; | ||
| 714 | - } | ||
| 715 | - } | ||
| 716 | - | ||
| 717 | 695 | // TODO(joyeecheung): check incompatible Node.js flags. | |
| 718 | 696 | return true; | |
| 719 | 697 | } | |
@@ -1180,7 +1158,6 @@ ExitCode SnapshotBuilder::CreateSnapshot(SnapshotData* out, | |||
| 1180 | 1158 | per_process::metadata.versions.node, | |
| 1181 | 1159 | per_process::metadata.arch, | |
| 1182 | 1160 | per_process::metadata.platform, | |
| 1183 | - v8::ScriptCompiler::CachedDataVersionTag(), | ||
| 1184 | 1161 | config->flags}; | |
| 1185 | 1162 | ||
| 1186 | 1163 | // We cannot resurrect the handles from the snapshot, so make sure that | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -19,6 +19,13 @@ test-fs-read-stream-concurrent-reads: PASS, FLAKY | |||
| 19 | 19 | # https://github.com/nodejs/node/issues/52630 | |
| 20 | 20 | test-error-serdes: PASS, FLAKY | |
| 21 | 21 | ||
| 22 | + # Until V8 provides a better way to check for flag mismatch without | ||
| 23 | + # making the code cache/snapshot unreproducible, disable the test | ||
| 24 | + # for a preemptive check now. It should idealy fail more gracefully | ||
| 25 | + # with a better checking mechanism. | ||
| 26 | + # https://github.com/nodejs/build/issues/3043 | ||
| 27 | + test-snapshot-incompatible: SKIP | ||
| 28 | + | ||
| 22 | 29 | [$system==win32] | |
| 23 | 30 | ||
| 24 | 31 | # Windows on x86 | |
| Back | FazBrowse Home | New Git URL |
0 commit comments