Seasonal greetings
Ho ho ho. Tbr: santa@chromium.org No-presubmit: true Change-Id: Ida950937a352f32ccf8127907f623e92332f4806 Reviewed-on: https://chromium-review.googlesource.com/c/1390119 Reviewed-by: Jakob Gruber <jgruber@chromium.org> Commit-Queue: Jakob Gruber <jgruber@chromium.org> Cr-Commit-Position: refs/heads/master@{#58459}
This commit is contained in:
parent
0ae25272c6
commit
28275cd412
20
src/d8.cc
20
src/d8.cc
@ -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) {
|
||||
|
1
src/d8.h
1
src/d8.h
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user