diff options
Diffstat (limited to 'web/storage.cpp')
| -rw-r--r-- | web/storage.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
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), { | |||
| 43 | self instanceof WorkerGlobalScope; | 43 | self instanceof WorkerGlobalScope; |
| 44 | console.assert(inBrowser || inWorker, "Non-browsers not supported"); | 44 | console.assert(inBrowser || inWorker, "Non-browsers not supported"); |
| 45 | 45 | ||
| 46 | // See comment in callback.js about this workaround | 46 | // This is a workaround related to usign WASM64 |
| 47 | // JavaScript's UTF8ToString expects a pointer argument, which for JS is | ||
| 48 | // of type "number", but WASM64 is passing a BigInt. See also: | ||
| 49 | // https://github.com/emscripten-core/emscripten/issues/21541 | ||
| 50 | // (but I could not make the suggested solution work in this case). | ||
| 51 | // TODO: check if there is a better workaround. | ||
| 47 | const non64_url = Number(url); | 52 | const non64_url = Number(url); |
| 48 | const non64_key = Number(key); | 53 | const non64_key = Number(key); |
| 49 | url = UTF8ToString(non64_url); | 54 | url = UTF8ToString(non64_url); |
