Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion src/low_loop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -482,9 +482,16 @@ void low_loop_clear_callback(low_t *low, LowLoopCallback *callback)
void low_call_next_tick(duk_context *ctx, int num_args)
{
low_t *low = duk_get_low_context(ctx);
// Push at the top of the stack - this probably is really slow, but it works
duk_require_stack(low->next_tick_ctx, num_args + 2);
duk_xmove_top(low->next_tick_ctx, ctx, num_args + 1);
duk_push_int(low->next_tick_ctx, num_args);
duk_insert(low->next_tick_ctx, 0);

duk_xmove_top(low->next_tick_ctx, ctx, num_args + 1);
for (int i = 0; i < num_args + 1; i++) {
duk_insert(low->next_tick_ctx, 0);
}

}


Expand Down