Commit ec0f51ff authored by Jakob Gruber's avatar Jakob Gruber Committed by Commit Bot

[mksnapshot] Default-init embedded variant to "Default"

This was always the intended behavior: when --embedded-variant is not
passed, we should assume "Default". What actually happened in this
case was that we'd initialize to nullptr. This CL adds the missing
nullptr check.

Bug: v8:6666
Change-Id: I87247c6c6cfec20da86d2714732a2f6044bb9b77
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1526193
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Auto-Submit: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60278}
parent 3a6ecfec
......@@ -275,7 +275,9 @@ int main(int argc, char** argv) {
i::EmbeddedFileWriter embedded_writer;
embedded_writer.SetEmbeddedFile(i::FLAG_embedded_src);
embedded_writer.SetEmbeddedVariant(i::FLAG_embedded_variant);
if (i::FLAG_embedded_variant != nullptr) {
embedded_writer.SetEmbeddedVariant(i::FLAG_embedded_variant);
}
std::unique_ptr<char> embed_script(
GetExtraCode(argc >= 2 ? argv[1] : nullptr, "embedding"));
......
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