You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Intermittent crash in /css/css-font-loading/fontfaceset-worker-fontface-crash.html #50063
css/css-font-loading/fontfaceset-worker-fontface-crash.html has been crashing intermittently since #50046. I got 1 crash in 60 runs on main (f0c02de):
The worker in that test dispatches a message event to itself from inside its own message handler, so it hits "too much recursion". Right after that it calls new FontFace(...) with the stack nearly full, the promise can't be created, and Promise::new asserts.
This isn't specific to workers, though. Calling new FontFace(...) near the recursion limit on a regular page crashes every time on main too. #50046 just made this worker test reach it, because before that there was no FontFace in workers and the line threw a ReferenceError.
Any constructor that creates a promise could panic the same way, but for this one I'd make the FontFace constructor throw when the promise can't be created. I'm working on it.
To reproduce: ./mach test-wpt --repeat 60 css/css-font-loading/fontfaceset-worker-fontface-crash.html
My plan is to add a fallible way to create a Promise that returns Error::JSFailed when SpiderMonkey can't create the promise object, and use it in the FontFace constructor so it throws instead. Promise::new stays the same, so nothing else changes. Then new FontFace(...) near the recursion limit throws the "too much recursion" error to script, which is what Firefox does.
changed the title [-]Panic when creating a FontFace in a worker after too much recursion[/-][+]Intermittent crash in `/css/css-font-loading/fontfaceset-worker-fontface-crash.html`[/+]on Nov 19, 2026
Activity
rogerkorantenng commentedon Nov 19, 2026
My plan is to add a fallible way to create a Promise that returns Error::JSFailed when SpiderMonkey can't create the promise object, and use it in the FontFace constructor so it throws instead. Promise::new stays the same, so nothing else changes. Then new FontFace(...) near the recursion limit throws the "too much recursion" error to script, which is what Firefox does.
rogerkorantenng commentedon Nov 19, 2026
@servo-highfive assign me
servo-highfive commentedon Nov 19, 2026
Hey @rogerkorantenng! Thanks for your interest in working on this issue. It's now assigned to you!
[-]Panic when creating a FontFace in a worker after too much recursion[/-][+]Intermittent crash in `/css/css-font-loading/fontfaceset-worker-fontface-crash.html`[/+]script: Create a FontFace's promise when it's first used