1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-02 09:34:19 -04:00
denoland-deno/cli/tests/testdata/run/unhandled_rejection_dynamic_import
Bartek Iwańczuk 208c91b68f
fix(core): run macrotasks and next ticks after polling dynamic imports (#17173)
This commit fixes handling of rejected promises in dynamic imports
evaluation.

Previously we were running callbacks for next ticks and macrotasks
_before_ polling
dynamic imports and checked for unhandled rejections immediately after.
This is wrong,
as `unhandledrejection` event is dispatched and its callbacks are run as
macrotasks.

This commit changes order of actions performed by the event loop to
following:
- poll async ops
- poll dynamic imports
- run next tick callbacks
- run macrotask callbacks
- check for unhandled promise rejections
2022-12-23 19:46:24 +01:00
..
import.ts fix(core): run macrotasks and next ticks after polling dynamic imports (#17173) 2022-12-23 19:46:24 +01:00
main.ts fix(core): run macrotasks and next ticks after polling dynamic imports (#17173) 2022-12-23 19:46:24 +01:00
main.ts.out fix(core): run macrotasks and next ticks after polling dynamic imports (#17173) 2022-12-23 19:46:24 +01:00