Commit 28275cd4 authored by Jakob Gruber's avatar Jakob Gruber Committed by Commit Bot

Seasonal greetings

Ho ho ho.

Tbr: santa@chromium.org
No-presubmit: true
Change-Id: Ida950937a352f32ccf8127907f623e92332f4806
Reviewed-on: https://chromium-review.googlesource.com/c/1390119Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58459}
parent 0ae25272
......@@ -2932,6 +2932,25 @@ bool Shell::SetOptions(int argc, char* argv[]) {
return true;
}
namespace {
void SeasonalGreetings() {
if (Shell::script_executed()) return;
// clang-format off
printf(
" .-\"\"-. \n"
" /,..___\\ __ __ ____ _ _ _ \n"
"() {_____} | \\/ | ___ _ __ _ __ _ _ / ___| |__ _ __(_)___| |_ _ __ ___ __ _ ___ \n"
" (/-@-@-\\) | |\\/| |/ _ \\ '__| '__| | | | | | | '_ \\| '__| / __| __| '_ ` _ \\ / _` / __| \n"
" {`-=^=-'} | | | | __/ | | | | |_| | | |___| | | | | | \\__ \\ |_| | | | | | (_| \\__ \\ \n"
" { `-' } |_| |_|\\___|_| |_| \\__, | \\____|_| |_|_| |_|___/\\__|_| |_| |_|\\__,_|___/ \n"
" { } |___/ \n"
" `---' \n");
// clang-format on
}
} // namespace
int Shell::RunMain(Isolate* isolate, int argc, char* argv[], bool last_run) {
for (int i = 1; i < options.num_isolates; ++i) {
options.isolate_sources[i].StartExecuteInThread();
......@@ -2953,6 +2972,7 @@ int Shell::RunMain(Isolate* isolate, int argc, char* argv[], bool last_run) {
InspectorClient inspector_client(context, options.enable_inspector);
PerIsolateData::RealmScope realm_scope(PerIsolateData::Get(isolate));
options.isolate_sources[0].Execute(isolate);
SeasonalGreetings();
CompleteMessageLoop(isolate);
}
if (!use_existing_context) {
......
......@@ -534,6 +534,7 @@ class Shell : public i::AllStatic {
static char* ReadCharsFromTcpPort(const char* name, int* size_out);
static void set_script_executed() { script_executed_.store(true); }
static bool script_executed() { return script_executed_.load(); }
static bool use_interactive_shell() {
return (options.interactive_shell || !script_executed_.load()) &&
!options.test_shell;
......
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