From 3ca4814562f6c756e9a110dab7d54cda30267fb1 Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Thu, 25 Sep 2025 22:17:31 +0200 Subject: Recovered comment that appeared only in removed file --- web/storage.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/web/storage.cpp b/web/storage.cpp index d540a5c..780926e 100644 --- a/web/storage.cpp +++ b/web/storage.cpp @@ -43,7 +43,12 @@ EM_ASYNC_JS(int, download_and_store, (const char *key, const char *url), { self instanceof WorkerGlobalScope; console.assert(inBrowser || inWorker, "Non-browsers not supported"); - // See comment in callback.js about this workaround + // This is a workaround related to usign WASM64 + // JavaScript's UTF8ToString expects a pointer argument, which for JS is + // of type "number", but WASM64 is passing a BigInt. See also: + // https://github.com/emscripten-core/emscripten/issues/21541 + // (but I could not make the suggested solution work in this case). + // TODO: check if there is a better workaround. const non64_url = Number(url); const non64_key = Number(key); url = UTF8ToString(non64_url); -- cgit v1.3