Skip to content

Commit 084611f

Browse files
authored
Add #if ASSERTIONS around assert in library_async.js (#20722)
This fixes STRICT + ASYNCIFY + ASSERTIONS=0 builds. Fixes: #20721
1 parent 94b36c0 commit 084611f

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

src/library_async.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,9 @@ addToLibrary({
156156
} finally {
157157
if (!ABORT) {
158158
var y = Asyncify.exportCallStack.pop();
159+
#if ASSERTIONS
159160
assert(y === x);
161+
#endif
160162
#if ASYNCIFY_DEBUG >= 2
161163
dbg(`ASYNCIFY: ${' '.repeat(Asyncify.exportCallStack.length)} finally ${x}`);
162164
#endif

test/test_core.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8311,6 +8311,7 @@ def test_vswprintf_utf8(self):
83118311
# longjmp or exceptions.
83128312
def test_asyncify_longjmp(self):
83138313
self.set_setting('ASYNCIFY')
8314+
self.set_setting('STRICT')
83148315
self.do_core_test('test_asyncify_longjmp.c')
83158316

83168317
# Test that a main with arguments is automatically asyncified.

0 commit comments

Comments
 (0)