Commit 09a2ada4 authored by Ross McIlroy's avatar Ross McIlroy Committed by V8 LUCI CQ

[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: 's avatarJakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74786}
parent 1f9f0a4a
...@@ -8305,21 +8305,17 @@ void Isolate::Initialize(Isolate* isolate, ...@@ -8305,21 +8305,17 @@ void Isolate::Initialize(Isolate* isolate,
} }
// TODO(jochen): Once we got rid of Isolate::Current(), we can remove this. // TODO(jochen): Once we got rid of Isolate::Current(), we can remove this.
Isolate::Scope isolate_scope(isolate); 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 (!i::Snapshot::Initialize(i_isolate)) {
// If snapshot data was provided and we failed to deserialize it must // If snapshot data was provided and we failed to deserialize it must
// have been corrupted. // have been corrupted.
if (i_isolate->snapshot_blob() != nullptr) { FATAL(
FATAL( "Failed to deserialize the V8 snapshot blob. This can mean that the "
"Failed to deserialize the V8 snapshot blob. This can mean that the " "snapshot blob file is corrupted or missing.");
"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);
}
} }
i_isolate->set_only_terminate_in_safe_scope( i_isolate->set_only_terminate_in_safe_scope(
params.only_terminate_in_safe_scope); params.only_terminate_in_safe_scope);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment