[snapshot] Remove no-snapshot initialization path.

This is no longer supported and currently fails later when V8 is
executed if taken, so remove it and fail early during initialization.

BUG=chromium:1208472

Change-Id: I0a1fe947facef0128c6695a4091c5fe8d4c56cc6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2919668
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Auto-Submit: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74786}
This commit is contained in:
Ross McIlroy 2021-05-26 12:30:18 +01:00 committed by V8 LUCI CQ
parent 1f9f0a4a19
commit 09a2ada4d7

View File

@ -8305,21 +8305,17 @@ void Isolate::Initialize(Isolate* isolate,
}
// TODO(jochen): Once we got rid of Isolate::Current(), we can remove this.
Isolate::Scope isolate_scope(isolate);
if (i_isolate->snapshot_blob() == nullptr) {
FATAL(
"V8 snapshot blob was not set during initialization. This can mean "
"that the snapshot blob file is corrupted or missing.");
}
if (!i::Snapshot::Initialize(i_isolate)) {
// If snapshot data was provided and we failed to deserialize it must
// have been corrupted.
if (i_isolate->snapshot_blob() != nullptr) {
FATAL(
"Failed to deserialize the V8 snapshot blob. This can mean that the "
"snapshot blob file is corrupted or missing.");
}
base::ElapsedTimer timer;
if (i::FLAG_profile_deserialization) timer.Start();
i_isolate->InitWithoutSnapshot();
if (i::FLAG_profile_deserialization) {
double ms = timer.Elapsed().InMillisecondsF();
i::PrintF("[Initializing isolate from scratch took %0.3f ms]\n", ms);
}
FATAL(
"Failed to deserialize the V8 snapshot blob. This can mean that the "
"snapshot blob file is corrupted or missing.");
}
i_isolate->set_only_terminate_in_safe_scope(
params.only_terminate_in_safe_scope);