Skip to content

Commit b2d4756

Browse files
authored
Assert on async ccalls where they are not supported (emscripten-core#9124)
This avoids confusing errors for users. Refs emscripten-core#9029.
1 parent ad1bf06 commit b2d4756

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/preamble.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,12 @@ function ccall(ident, returnType, argTypes, args, opts) {
129129
});
130130
});
131131
}
132+
#else // EMTERPRETIFY_ASYNC
133+
#if ASSERTIONS
134+
assert(!(opts && opts.async), 'async call is only supported with Emterpretify for now, see #9029');
132135
#endif
136+
#endif // EMTERPRETIFY_ASYNC
137+
133138
ret = convertReturnValue(ret);
134139
if (stack !== 0) stackRestore(stack);
135140
#if EMTERPRETIFY_ASYNC

0 commit comments

Comments
 (0)