From c169e43e1397e7bc0113f1fc5bea13288ef65aa1 Mon Sep 17 00:00:00 2001 From: circl Date: Sun, 9 Jun 2024 12:10:28 +0200 Subject: [PATCH] Userland: Remove some SerenityOS checks --- Userland/Libraries/LibAccelGfx/Context.cpp | 4 +-- .../Libraries/LibAudio/PlaybackStream.cpp | 8 ++--- .../Libraries/LibFileSystem/FileSystem.cpp | 10 ++----- .../Libraries/LibJS/Heap/BlockAllocator.cpp | 13 +-------- Userland/Libraries/LibJS/Heap/Heap.cpp | 18 ------------ Userland/Libraries/LibJS/Heap/HeapBlock.cpp | 8 ----- .../Libraries/LibJS/Runtime/GlobalObject.cpp | 3 -- Userland/Libraries/LibMain/Main.cpp | 3 -- Userland/Libraries/LibTLS/TLSv12.cpp | 4 --- .../Libraries/LibTest/JavaScriptTestRunner.h | 29 ------------------- .../LibTest/JavaScriptTestRunnerMain.cpp | 15 +--------- Userland/Libraries/LibThreading/Mutex.h | 6 ---- Userland/Libraries/LibThreading/Thread.cpp | 6 ---- Userland/Libraries/LibTimeZone/TimeZone.cpp | 9 ------ .../LibWeb/Loader/ResourceLoader.cpp | 9 ------ .../WebContent/ConnectionFromClient.cpp | 14 --------- Userland/Utilities/headless-browser.cpp | 25 ++-------------- Userland/Utilities/js.cpp | 3 -- 18 files changed, 10 insertions(+), 177 deletions(-) diff --git a/Userland/Libraries/LibAccelGfx/Context.cpp b/Userland/Libraries/LibAccelGfx/Context.cpp index 207f796405c..37930c33add 100644 --- a/Userland/Libraries/LibAccelGfx/Context.cpp +++ b/Userland/Libraries/LibAccelGfx/Context.cpp @@ -38,7 +38,7 @@ public: private: CGLContextObj m_context; }; -#elif !defined(AK_OS_SERENITY) +#else class EGLContextWrapper : public Context { public: EGLContextWrapper(EGLContext context) @@ -96,7 +96,7 @@ static ErrorOr> make_context_cgl() return make(context); } -#elif !defined(AK_OS_SERENITY) +#else static StringView format_egl_error(EGLint error) { diff --git a/Userland/Libraries/LibAudio/PlaybackStream.cpp b/Userland/Libraries/LibAudio/PlaybackStream.cpp index c8c7526fcd7..168e7ba88f7 100644 --- a/Userland/Libraries/LibAudio/PlaybackStream.cpp +++ b/Userland/Libraries/LibAudio/PlaybackStream.cpp @@ -9,9 +9,7 @@ #include #include -#if defined(AK_OS_SERENITY) -# include -#elif defined(HAVE_PULSEAUDIO) +#if defined(HAVE_PULSEAUDIO) # include #elif defined(AK_OS_MACOS) # include @@ -23,9 +21,7 @@ ErrorOr> PlaybackStream::create(OutputState initia { VERIFY(data_request_callback); // Create the platform-specific implementation for this stream. -#if defined(AK_OS_SERENITY) - return PlaybackStreamSerenity::create(initial_output_state, sample_rate, channels, target_latency_ms, move(data_request_callback)); -#elif defined(HAVE_PULSEAUDIO) +#if defined(HAVE_PULSEAUDIO) return PlaybackStreamPulseAudio::create(initial_output_state, sample_rate, channels, target_latency_ms, move(data_request_callback)); #elif defined(AK_OS_MACOS) return PlaybackStreamAudioUnit::create(initial_output_state, sample_rate, channels, target_latency_ms, move(data_request_callback)); diff --git a/Userland/Libraries/LibFileSystem/FileSystem.cpp b/Userland/Libraries/LibFileSystem/FileSystem.cpp index da8bdd25533..e3a700da62c 100644 --- a/Userland/Libraries/LibFileSystem/FileSystem.cpp +++ b/Userland/Libraries/LibFileSystem/FileSystem.cpp @@ -12,9 +12,7 @@ #include #include -#if defined(AK_OS_SERENITY) -# include -#elif !defined(AK_OS_IOS) && defined(AK_OS_BSD_GENERIC) +#if !defined(AK_OS_IOS) && defined(AK_OS_BSD_GENERIC) # include #elif defined(AK_OS_LINUX) # include @@ -391,11 +389,7 @@ ErrorOr block_device_size_from_ioctl(StringView path) ErrorOr block_device_size_from_ioctl(int fd) { -#if defined(AK_OS_SERENITY) - u64 size = 0; - TRY(Core::System::ioctl(fd, STORAGE_DEVICE_GET_SIZE, &size)); - return static_cast(size); -#elif defined(AK_OS_MACOS) +#if defined(AK_OS_MACOS) u64 block_count = 0; u32 block_size = 0; TRY(Core::System::ioctl(fd, DKIOCGETBLOCKCOUNT, &block_count)); diff --git a/Userland/Libraries/LibJS/Heap/BlockAllocator.cpp b/Userland/Libraries/LibJS/Heap/BlockAllocator.cpp index 22bdb85695b..634e3f457bf 100644 --- a/Userland/Libraries/LibJS/Heap/BlockAllocator.cpp +++ b/Userland/Libraries/LibJS/Heap/BlockAllocator.cpp @@ -16,8 +16,7 @@ # include #endif -// FIXME: Implement MADV_FREE and/or MADV_DONTNEED on SerenityOS. -#if defined(AK_OS_SERENITY) || defined(AK_OS_GNU_HURD) || (!defined(MADV_FREE) && !defined(MADV_DONTNEED)) +#if defined(AK_OS_GNU_HURD) || (!defined(MADV_FREE) && !defined(MADV_DONTNEED)) # define USE_FALLBACK_BLOCK_DEALLOCATION #endif @@ -45,20 +44,10 @@ void* BlockAllocator::allocate_block([[maybe_unused]] char const* name) auto* block = m_blocks.unstable_take(random_index); ASAN_UNPOISON_MEMORY_REGION(block, HeapBlock::block_size); LSAN_REGISTER_ROOT_REGION(block, HeapBlock::block_size); -#ifdef AK_OS_SERENITY - if (set_mmap_name(block, HeapBlock::block_size, name) < 0) { - perror("set_mmap_name"); - VERIFY_NOT_REACHED(); - } -#endif return block; } -#ifdef AK_OS_SERENITY - auto* block = (HeapBlock*)serenity_mmap(nullptr, HeapBlock::block_size, PROT_READ | PROT_WRITE, MAP_ANONYMOUS | MAP_RANDOMIZED | MAP_PRIVATE, -1, 0, HeapBlock::block_size, name); -#else auto* block = (HeapBlock*)mmap(nullptr, HeapBlock::block_size, PROT_READ | PROT_WRITE, MAP_ANONYMOUS | MAP_PRIVATE, -1, 0); -#endif VERIFY(block != MAP_FAILED); LSAN_REGISTER_ROOT_REGION(block, HeapBlock::block_size); return block; diff --git a/Userland/Libraries/LibJS/Heap/Heap.cpp b/Userland/Libraries/LibJS/Heap/Heap.cpp index 35ddd247ba6..42c7045dc6e 100644 --- a/Userland/Libraries/LibJS/Heap/Heap.cpp +++ b/Userland/Libraries/LibJS/Heap/Heap.cpp @@ -24,20 +24,12 @@ #include #include -#ifdef AK_OS_SERENITY -# include -#endif - #ifdef HAS_ADDRESS_SANITIZER # include #endif namespace JS { -#ifdef AK_OS_SERENITY -static int gc_perf_string_id; -#endif - // NOTE: We keep a per-thread list of custom ranges. This hinges on the assumption that there is one JS VM per thread. static __thread HashMap* s_custom_ranges_for_conservative_scan = nullptr; static __thread HashMap* s_safe_function_locations = nullptr; @@ -45,11 +37,6 @@ static __thread HashMap* s_safe_function_locations = Heap::Heap(VM& vm) : HeapBase(vm) { -#ifdef AK_OS_SERENITY - auto gc_signpost_string = "Garbage collection"sv; - gc_perf_string_id = perf_register_string(gc_signpost_string.characters_without_null_termination(), gc_signpost_string.length()); -#endif - static_assert(HeapBlock::min_possible_cell_size <= 32, "Heap Cell tracking uses too much data!"); m_size_based_cell_allocators.append(make(64)); m_size_based_cell_allocators.append(make(96)); @@ -264,11 +251,6 @@ void Heap::collect_garbage(CollectionType collection_type, bool print_report) VERIFY(!m_collecting_garbage); TemporaryChange change(m_collecting_garbage, true); -#ifdef AK_OS_SERENITY - static size_t global_gc_counter = 0; - perf_event(PERF_EVENT_SIGNPOST, gc_perf_string_id, global_gc_counter++); -#endif - Core::ElapsedTimer collection_measurement_timer; if (print_report) collection_measurement_timer.start(); diff --git a/Userland/Libraries/LibJS/Heap/HeapBlock.cpp b/Userland/Libraries/LibJS/Heap/HeapBlock.cpp index 6f978e4a388..b1a65440790 100644 --- a/Userland/Libraries/LibJS/Heap/HeapBlock.cpp +++ b/Userland/Libraries/LibJS/Heap/HeapBlock.cpp @@ -20,15 +20,7 @@ namespace JS { NonnullOwnPtr HeapBlock::create_with_cell_size(Heap& heap, CellAllocator& cell_allocator, size_t cell_size, [[maybe_unused]] char const* class_name) { -#ifdef AK_OS_SERENITY - char name[64]; - if (class_name) - snprintf(name, sizeof(name), "LibJS: HeapBlock(%zu): %s", cell_size, class_name); - else - snprintf(name, sizeof(name), "LibJS: HeapBlock(%zu)", cell_size); -#else char const* name = nullptr; -#endif auto* block = static_cast(cell_allocator.block_allocator().allocate_block(name)); new (block) HeapBlock(heap, cell_allocator, cell_size); return NonnullOwnPtr(NonnullOwnPtr::Adopt, *block); diff --git a/Userland/Libraries/LibJS/Runtime/GlobalObject.cpp b/Userland/Libraries/LibJS/Runtime/GlobalObject.cpp index 9e78b3334a8..1cc2d885891 100644 --- a/Userland/Libraries/LibJS/Runtime/GlobalObject.cpp +++ b/Userland/Libraries/LibJS/Runtime/GlobalObject.cpp @@ -210,9 +210,6 @@ GlobalObject::~GlobalObject() = default; JS_DEFINE_NATIVE_FUNCTION(GlobalObject::gc) { -#ifdef AK_OS_SERENITY - dbgln("Forced garbage collection requested!"); -#endif vm.heap().collect_garbage(); return js_undefined(); } diff --git a/Userland/Libraries/LibMain/Main.cpp b/Userland/Libraries/LibMain/Main.cpp index 6b0604c02e4..c20f101c8ee 100644 --- a/Userland/Libraries/LibMain/Main.cpp +++ b/Userland/Libraries/LibMain/Main.cpp @@ -44,9 +44,6 @@ int main(int argc, char** argv) if (result.is_error()) { auto error = result.release_error(); warnln("\033[31;1mRuntime error\033[0m: {}", error); -#ifdef AK_OS_SERENITY - dbgln("\033[31;1mExiting with runtime error\033[0m: {}", error); -#endif return Main::return_code_for_errors(); } return result.value(); diff --git a/Userland/Libraries/LibTLS/TLSv12.cpp b/Userland/Libraries/LibTLS/TLSv12.cpp index b79aa2079d0..c49a3056ddb 100644 --- a/Userland/Libraries/LibTLS/TLSv12.cpp +++ b/Userland/Libraries/LibTLS/TLSv12.cpp @@ -579,10 +579,6 @@ ErrorOr> DefaultRootCACertificates::load_certificates(Spanread_until_eof()); -#ifdef AK_OS_SERENITY - else - return cacert_file_or_error.release_error(); -#endif auto user_cert_path = TRY(String::formatted("{}/.config/certs.pem", Core::StandardPaths::home_directory())); if (FileSystem::exists(user_cert_path)) { diff --git a/Userland/Libraries/LibTest/JavaScriptTestRunner.h b/Userland/Libraries/LibTest/JavaScriptTestRunner.h index 19a7c182585..ac199f89519 100644 --- a/Userland/Libraries/LibTest/JavaScriptTestRunner.h +++ b/Userland/Libraries/LibTest/JavaScriptTestRunner.h @@ -36,10 +36,6 @@ #include #include -#ifdef AK_OS_SERENITY -# include -#endif - #define STRCAT(x, y) __STRCAT(x, y) #define STRSTRCAT(x, y) __STRSTRCAT(x, y) #define __STRCAT(x, y) x #y @@ -280,11 +276,6 @@ inline JSFileResult TestRunner::run_file_test(ByteString const& test_path) { g_currently_running_test = test_path; -#ifdef AK_OS_SERENITY - auto string_id = perf_register_string(test_path.characters(), test_path.length()); - perf_event(PERF_EVENT_SIGNPOST, string_id, 0); -#endif - double start_time = get_time_in_ms(); JS::GCPtr realm; @@ -515,12 +506,7 @@ inline void TestRunner::print_file_result(JSFileResult const& file_result) const if (!file_result.logged_messages.is_empty()) { print_modifiers({ FG_GRAY, FG_BOLD }); -#ifdef AK_OS_SERENITY - outln(" ℹ Console output:"); -#else - // This emoji has a second invisible byte after it. The one above does not outln(" ℹ️ Console output:"); -#endif print_modifiers({ CLEAR, FG_GRAY }); for (auto& message : file_result.logged_messages) outln(" {}", message); @@ -530,12 +516,7 @@ inline void TestRunner::print_file_result(JSFileResult const& file_result) const auto test_error = file_result.error.value(); print_modifiers({ FG_RED }); -#ifdef AK_OS_SERENITY - outln(" ❌ The file failed to parse"); -#else - // No invisible byte here, but the spacing still needs to be altered on the host outln(" ❌ The file failed to parse"); -#endif outln(); print_modifiers({ FG_GRAY }); for (auto& message : test_error.hint.split('\n', SplitBehavior::KeepEmpty)) { @@ -557,19 +538,9 @@ inline void TestRunner::print_file_result(JSFileResult const& file_result) const print_modifiers({ FG_GRAY, FG_BOLD }); if (failed) { -#ifdef AK_OS_SERENITY - out(" ❌ Suite: "); -#else - // No invisible byte here, but the spacing still needs to be altered on the host out(" ❌ Suite: "); -#endif } else { -#ifdef AK_OS_SERENITY - out(" ⚠ Suite: "); -#else - // This emoji has a second invisible byte after it. The one above does not out(" ⚠️ Suite: "); -#endif } print_modifiers({ CLEAR, FG_GRAY }); diff --git a/Userland/Libraries/LibTest/JavaScriptTestRunnerMain.cpp b/Userland/Libraries/LibTest/JavaScriptTestRunnerMain.cpp index d19e7ba7e5f..8a562f7668c 100644 --- a/Userland/Libraries/LibTest/JavaScriptTestRunnerMain.cpp +++ b/Userland/Libraries/LibTest/JavaScriptTestRunnerMain.cpp @@ -84,12 +84,7 @@ int main(int argc, char** argv) #endif bool print_times = false; - bool print_progress = -#ifdef AK_OS_SERENITY - true; // Use OSC 9 to print progress -#else - false; -#endif + bool print_progress = false; bool print_json = false; bool per_file = false; StringView specified_test_root; @@ -139,9 +134,6 @@ int main(int argc, char** argv) if (!specified_test_root.is_empty()) { test_root = ByteString { specified_test_root }; } else { -#ifdef AK_OS_SERENITY - test_root = LexicalPath::join("/home/anon/Tests"sv, ByteString::formatted("{}-tests", program_name.split_view('-').last())).string(); -#else char* ladybird_source_dir = getenv("LADYBIRD_SOURCE_DIR"); if (!ladybird_source_dir) { warnln("No test root given, {} requires the LADYBIRD_SOURCE_DIR environment variable to be set", g_program_name); @@ -149,7 +141,6 @@ int main(int argc, char** argv) } test_root = ByteString::formatted("{}/{}", ladybird_source_dir, g_test_root_fragment); common_path = ByteString::formatted("{}/Userland/Libraries/LibJS/Tests/test-common.js", ladybird_source_dir); -#endif } if (!FileSystem::is_directory(test_root)) { warnln("Test root is not a directory: {}", test_root); @@ -157,16 +148,12 @@ int main(int argc, char** argv) } if (common_path.is_empty()) { -#ifdef AK_OS_SERENITY - common_path = "/home/anon/Tests/js-tests/test-common.js"; -#else char* ladybird_source_dir = getenv("LADYBIRD_SOURCE_DIR"); if (!ladybird_source_dir) { warnln("No test root given, {} requires the LADYBIRD_SOURCE_DIR environment variable to be set", g_program_name); return 1; } common_path = ByteString::formatted("{}/Userland/Libraries/LibJS/Tests/test-common.js", ladybird_source_dir); -#endif } auto test_root_or_error = FileSystem::real_path(test_root); diff --git a/Userland/Libraries/LibThreading/Mutex.h b/Userland/Libraries/LibThreading/Mutex.h index 30f132ead9e..294c3ae5b0d 100644 --- a/Userland/Libraries/LibThreading/Mutex.h +++ b/Userland/Libraries/LibThreading/Mutex.h @@ -23,12 +23,10 @@ public: Mutex() : m_lock_count(0) { -#ifndef AK_OS_SERENITY pthread_mutexattr_t attr; pthread_mutexattr_init(&attr); pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE); pthread_mutex_init(&m_mutex, &attr); -#endif } ~Mutex() { @@ -40,11 +38,7 @@ public: void unlock(); private: -#ifdef AK_OS_SERENITY - pthread_mutex_t m_mutex = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP; -#else pthread_mutex_t m_mutex; -#endif unsigned m_lock_count { 0 }; }; diff --git a/Userland/Libraries/LibThreading/Thread.cpp b/Userland/Libraries/LibThreading/Thread.cpp index 9f9bc13efa9..db74239d89f 100644 --- a/Userland/Libraries/LibThreading/Thread.cpp +++ b/Userland/Libraries/LibThreading/Thread.cpp @@ -102,12 +102,6 @@ void Thread::start() &NonnullRefPtr(*this).leak_ref()); VERIFY(rc == 0); -#ifdef AK_OS_SERENITY - if (!m_thread_name.is_empty()) { - rc = pthread_setname_np(m_tid, m_thread_name.characters()); - VERIFY(rc == 0); - } -#endif } void Thread::detach() diff --git a/Userland/Libraries/LibTimeZone/TimeZone.cpp b/Userland/Libraries/LibTimeZone/TimeZone.cpp index 53272430fac..f5858df8268 100644 --- a/Userland/Libraries/LibTimeZone/TimeZone.cpp +++ b/Userland/Libraries/LibTimeZone/TimeZone.cpp @@ -132,17 +132,8 @@ StringView current_time_zone() ErrorOr change_time_zone([[maybe_unused]] StringView time_zone) { -#ifdef AK_OS_SERENITY - TimeZoneFile time_zone_file("w"); - - if (auto new_time_zone = canonicalize_time_zone(time_zone); new_time_zone.has_value()) - return time_zone_file.write_time_zone(*new_time_zone); - - return Error::from_string_literal("Provided time zone is not supported"); -#else // Do not even attempt to change the time zone of someone's host machine. return {}; -#endif } ReadonlySpan __attribute__((weak)) all_time_zones() diff --git a/Userland/Libraries/LibWeb/Loader/ResourceLoader.cpp b/Userland/Libraries/LibWeb/Loader/ResourceLoader.cpp index 7fbb4c34bca..54a300e1813 100644 --- a/Userland/Libraries/LibWeb/Loader/ResourceLoader.cpp +++ b/Userland/Libraries/LibWeb/Loader/ResourceLoader.cpp @@ -24,10 +24,6 @@ #include #include -#ifdef AK_OS_SERENITY -# include -#endif - namespace Web { ResourceLoaderConnectorRequest::ResourceLoaderConnectorRequest() = default; @@ -140,13 +136,8 @@ static ByteString sanitized_url_for_logging(URL::URL const& url) static void emit_signpost(ByteString const& message, int id) { -#ifdef AK_OS_SERENITY - auto string_id = perf_register_string(message.characters(), message.length()); - perf_event(PERF_EVENT_SIGNPOST, string_id, id); -#else (void)message; (void)id; -#endif } static void store_response_cookies(Page& page, URL::URL const& url, ByteString const& set_cookie_entry) diff --git a/Userland/Services/WebContent/ConnectionFromClient.cpp b/Userland/Services/WebContent/ConnectionFromClient.cpp index db3e6322084..bbf625f9ff2 100644 --- a/Userland/Services/WebContent/ConnectionFromClient.cpp +++ b/Userland/Services/WebContent/ConnectionFromClient.cpp @@ -48,10 +48,6 @@ #include #include -#ifdef AK_OS_SERENITY -# include -#endif - namespace WebContent { ConnectionFromClient::ConnectionFromClient(NonnullOwnPtr socket) @@ -130,16 +126,6 @@ void ConnectionFromClient::load_url(u64 page_id, const URL::URL& url) if (!page.has_value()) return; -#if defined(AK_OS_SERENITY) - ByteString process_name; - if (url.host().has() || url.host() == String {}) - process_name = "WebContent"; - else - process_name = ByteString::formatted("WebContent: {}", url.serialized_host().release_value_but_fixme_should_propagate_errors()); - - pthread_setname_np(pthread_self(), process_name.characters()); -#endif - page->page().load(url); } diff --git a/Userland/Utilities/headless-browser.cpp b/Userland/Utilities/headless-browser.cpp index 7e360d93935..98648e5dc48 100644 --- a/Userland/Utilities/headless-browser.cpp +++ b/Userland/Utilities/headless-browser.cpp @@ -18,7 +18,9 @@ #include #include #include +#include #include +#include #include #include #include @@ -54,11 +56,6 @@ #include #include -#if !defined(AK_OS_SERENITY) -# include -# include -#endif - constexpr int DEFAULT_TIMEOUT_MS = 30000; // 30sec static StringView s_current_test_path; @@ -69,24 +66,14 @@ public: { RefPtr request_client; -#if defined(AK_OS_SERENITY) - (void)resources_folder; - (void)certificates; -#else auto request_server_paths = TRY(get_paths_for_helper_process("RequestServer"sv)); request_client = TRY(launch_request_server_process(request_server_paths, resources_folder, certificates)); -#endif auto database = TRY(WebView::Database::create()); auto cookie_jar = TRY(WebView::CookieJar::create(*database)); auto view = TRY(adopt_nonnull_own_or_enomem(new (nothrow) HeadlessWebContentView(move(database), move(cookie_jar), request_client))); -#if defined(AK_OS_SERENITY) - view->m_client_state.client = TRY(WebView::WebContentClient::try_create(*view)); - (void)command_line; - (void)is_layout_test_mode; -#else Ladybird::WebContentOptions web_content_options { .command_line = command_line, .executable_path = MUST(String::from_byte_string(MUST(Core::System::current_executable_path()))), @@ -97,7 +84,6 @@ public: auto candidate_web_content_paths = TRY(get_paths_for_helper_process("WebContent"sv)); view->m_client_state.client = TRY(launch_web_content_process(*view, candidate_web_content_paths, web_content_options, move(request_server_socket))); -#endif view->client().async_update_system_theme(0, move(theme)); @@ -173,12 +159,7 @@ private: }; on_request_worker_agent = [this]() { -#if defined(AK_OS_SERENITY) - auto worker_client = MUST(Web::HTML::WebWorkerClient::try_create()); - (void)this; -#else auto worker_client = MUST(launch_web_worker_process(MUST(get_paths_for_helper_process("WebWorker"sv)), *m_request_client)); -#endif return worker_client->dup_socket(); }; } @@ -657,10 +638,8 @@ ErrorOr serenity_main(Main::Arguments arguments) ByteString test_glob; Vector certificates; -#if !defined(AK_OS_SERENITY) platform_init(); resources_folder = s_serenity_resource_root; -#endif Core::ArgsParser args_parser; args_parser.set_general_help("This utility runs the Browser in headless mode."); diff --git a/Userland/Utilities/js.cpp b/Userland/Utilities/js.cpp index 1e81140d06d..0e76e219a7f 100644 --- a/Userland/Utilities/js.cpp +++ b/Userland/Utilities/js.cpp @@ -492,9 +492,6 @@ public: } auto output = TRY(generically_format_values(arguments.get>())); -#ifdef AK_OS_SERENITY - m_console->output_debug_message(log_level, output); -#endif switch (log_level) { case JS::Console::LogLevel::Debug: