Skip to content

Commit b914739

Browse files
committed
workaround for errors with JSTag in jsc
1 parent 033fc8d commit b914739

File tree

4 files changed

+17
-2
lines changed

4 files changed

+17
-2
lines changed

Kotlin-compose/build.log

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Built on 2025-08-06 12:54:47+02:00
1+
Built on 2025-08-08 16:11:09+02:00
22
Cloning into 'compose-multiplatform'...
33
84dad4d3f6 Use custom skiko (0.9.4.3) to fix the FinalizationRegistry API usage for web targets
44
Copying generated files into build/

Kotlin-compose/build.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ echo "Copying generated files into build/" | tee -a "$BUILD_LOG"
2929
mkdir -p build/ | tee -a "$BUILD_LOG"
3030
cp $BUILD_SRC_DIR/compose-benchmarks-benchmarks.{wasm,uninstantiated.mjs} build/ | tee -a "$BUILD_LOG"
3131
git apply hook-print.patch | tee -a "$BUILD_LOG"
32+
# TODO: Remove once either the Kotlin toolchain or JSC fixes the issue raised in https://github.com/WebKit/JetStream/pull/84#issuecomment-3164672425
33+
git apply jstag-workaround.patch | tee -a "$BUILD_LOG"
3234
cp $BUILD_SRC_DIR/skiko.{wasm,mjs} build/ | tee -a "$BUILD_LOG"
3335
git apply skiko-disable-instantiate.patch | tee -a "$BUILD_LOG"
3436
cp $BUILD_SRC_DIR/composeResources/compose_benchmarks.benchmarks.generated.resources/drawable/example1_cat.jpg build/ | tee -a "$BUILD_LOG"

Kotlin-compose/build/compose-benchmarks-benchmarks.uninstantiated.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ export async function instantiate(imports={}, runInitializer=true) {
383383

384384
const wasmFilePath = './compose-benchmarks-benchmarks.wasm';
385385

386-
const wasmTag = WebAssembly.JSTag ?? new WebAssembly.Tag({ parameters: ['externref'] });
386+
const wasmTag = new WebAssembly.Tag({ parameters: ['externref'] });
387387

388388
const importObject = {
389389
js_code,

Kotlin-compose/jstag-workaround.patch

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/Kotlin-compose/build/compose-benchmarks-benchmarks.uninstantiated.mjs b/Kotlin-compose/build/compose-benchmarks-benchmarks.uninstantiated.mjs
2+
index 3427ca2..882308d 100644
3+
--- a/Kotlin-compose/build/compose-benchmarks-benchmarks.uninstantiated.mjs
4+
+++ b/Kotlin-compose/build/compose-benchmarks-benchmarks.uninstantiated.mjs
5+
@@ -383,7 +383,7 @@ export async function instantiate(imports={}, runInitializer=true) {
6+
7+
const wasmFilePath = './compose-benchmarks-benchmarks.wasm';
8+
9+
- const wasmTag = WebAssembly.JSTag ?? new WebAssembly.Tag({ parameters: ['externref'] });
10+
+ const wasmTag = new WebAssembly.Tag({ parameters: ['externref'] });
11+
12+
const importObject = {
13+
js_code,

0 commit comments

Comments
 (0)