Skip to content

Commit ee7a686

Browse files
authored
Fix ASYNCIFY_DEBUG=2 (emscripten-core#23334)
Fixes: emscripten-core#23333
1 parent 9096999 commit ee7a686

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/library_async.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ addToLibrary({
123123
#endif
124124
ret[x] = (...args) => {
125125
#if ASYNCIFY_DEBUG >= 2
126-
dbg(`ASYNCIFY: ${' '.repeat(Asyncify.exportCallStack.length} try ${x}`);
126+
dbg(`ASYNCIFY: ${' '.repeat(Asyncify.exportCallStack.length)} try ${x}`);
127127
#endif
128128
#if ASYNCIFY == 1
129129
Asyncify.exportCallStack.push(x);
@@ -254,7 +254,7 @@ addToLibrary({
254254
setDataRewindFunc(ptr) {
255255
var bottomOfCallStack = Asyncify.exportCallStack[0];
256256
#if ASYNCIFY_DEBUG >= 2
257-
dbg('ASYNCIFY: setDataRewindFunc('+ptr+'), bottomOfCallStack is', bottomOfCallStack, new Error().stack);
257+
dbg(`ASYNCIFY: setDataRewindFunc(${ptr}), bottomOfCallStack is`, bottomOfCallStack, new Error().stack);
258258
#endif
259259
var rewindId = Asyncify.getCallStackId(bottomOfCallStack);
260260
{{{ makeSetValue('ptr', C_STRUCTS.asyncify_data_s.rewind_id, 'rewindId', 'i32') }}};

test/test_other.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10776,7 +10776,7 @@ def test_asyncify_advise(self):
1077610776
self.assertContained('[asyncify] i can', out)
1077710777

1077810778
def test_asyncify_stack_overflow(self):
10779-
self.emcc_args = ['-sASYNCIFY', '-sASYNCIFY_STACK_SIZE=4']
10779+
self.emcc_args = ['-sASYNCIFY', '-sASYNCIFY_STACK_SIZE=4', '-sASYNCIFY_DEBUG=2']
1078010780

1078110781
# The unreachable error on small stack sizes is not super-helpful. Try at
1078210782
# least to hint at increasing the stack size.

0 commit comments

Comments
 (0)