mirror of
https://github.com/storytold/effectcraft.git
synced 2026-10-14 19:27:05 -04:00
Web: a job worker that fails to start fails its job (#216)
worker.js left a rejected start (its async init) unhandled, which a page's Worker error event doesn't see: the page waited for "ready" forever and the render stayed pending until cancelled. The failed start is now re-raised where the page's onerror sees it, like the other worker failures; the job fails with the error and the worker is terminated. Test: apps/effectcraft-web/tests/workers.mjs (worker.js with a stub module whose init rejects; host.js with a worker whose start fails). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_018gnTnH3Jmk5zr4tMq1Mc9f
This commit is contained in:
4 files changed
+57
-2
No files matched your search
@@ -413,6 +413,11 @@ cargo xtask web --serve 8765 &
|
||||
node apps/effectcraft-web/tests/smoke.mjs --url http://127.0.0.1:8765/ --out target/web/smoke
|
||||
```
|
||||
|
||||
`apps/effectcraft-web/tests/workers.mjs` checks the job-worker plumbing (`js/host.js`,
|
||||
`web/worker.js`) under Node with a fake `Worker`, without a build: a replaced file is sent to a
|
||||
reused worker again even at the same size, and a worker that fails to start fails its job and is
|
||||
terminated (`node apps/effectcraft-web/tests/workers.mjs`).
|
||||
|
||||
It also checks the M13.10 paths: viewer frames rendered in frame workers while scrubbing with the
|
||||
CPU renderer (project synced as diffs, event-loop gaps under 400 ms), a `wait: true` render that
|
||||
replies when done while the page keeps running, and the Media Browser over browser storage; and
|
||||
|
||||
Reference in new issue
Block a user