| 545 | } |
| 546 | |
| 547 | static em_promise_result_t check_stack(void** result, void* data, void* value) { |
| 548 | // Make sure the stack pointer is the same every time this is called. |
| 549 | static uintptr_t expected_stack = 0; |
| 550 | uintptr_t curr_stack = emscripten_stack_get_current(); |
| 551 | if (!expected_stack) { |
| 552 | expected_stack = curr_stack; |
| 553 | return EM_PROMISE_FULFILL; |
| 554 | } |
| 555 | if (curr_stack != expected_stack) { |
| 556 | emscripten_console_logf("stack pointer at %p, expected %p", |
| 557 | (void*)curr_stack, |
| 558 | (void*)expected_stack); |
| 559 | return EM_PROMISE_REJECT; |
| 560 | } |
| 561 | return EM_PROMISE_FULFILL; |
| 562 | } |
| 563 | |
| 564 | int main() { |
| 565 | em_promise_t start = emscripten_promise_create(); |
nothing calls this directly
no test coverage detected