From 8a5f2c6f8c8774e18dbd55afb674020ef0106005 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sat, 12 Sep 2026 19:52:27 +0200 Subject: [PATCH] Show error dialogs instead of aborting the page on trace load errors. Exception catching was off by default in the web build, so the try/catch handlers around trace loading were dead code and any failure unwound through the page. --- profiler/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/profiler/CMakeLists.txt b/profiler/CMakeLists.txt index ae4e1827..1baa3ce4 100644 --- a/profiler/CMakeLists.txt +++ b/profiler/CMakeLists.txt @@ -358,6 +358,7 @@ if(NOT EMSCRIPTEN) endif() if(EMSCRIPTEN) + target_compile_options(${PROJECT_NAME} PRIVATE -sDISABLE_EXCEPTION_CATCHING=0) target_link_options(${PROJECT_NAME} PRIVATE -pthread -sASSERTIONS=0 @@ -369,6 +370,7 @@ if(EMSCRIPTEN) -sEXPORTED_FUNCTIONS=_main,_nativeOpenFile,_tracy_paste_clipboard -sEXPORTED_RUNTIME_METHODS=ccall -sENVIRONMENT=web,worker + -sDISABLE_EXCEPTION_CATCHING=0 "--pre-js;${CMAKE_CURRENT_LIST_DIR}/wasm/url_trace_pre.js" --preload-file embed.tracy )