Commit Graph

6 Commits

Author SHA1 Message Date
Timothy Flynn
1d4f431eb4 LibWeb: Add a crash test for re-importing throwing cyclic modules
There was a crash in JS::CyclicModule::evaluate due to a spec bug that
we worked around years ago (1dc9769f7d).

This bug has now been fixed in ECMA-262. This adds a regression crash
test to ensure we don't crash still after implementing that fix, as this
is really only reachable from an embedder.
2025-11-13 14:05:18 +01:00
caztanj
e93f44112d LibJS: Do not verify cycle root's status is linked in CyclicModule
This VERIFY is both incorrect and redundant. The VERIFY at step 2
verifies the status when evaluate is called on m_cycle_root.
2025-10-22 11:54:56 +02:00
Gingeh
28774efa22 LibWeb: Don't crash when drawing null image from offscreen canvas 2025-07-20 08:54:53 +02:00
Tim Ledbetter
d67a95c37e Tests: Remove print statement from crash test
Print statements aren't necessary in crash tests and will cause a
Javascript error when used.
2025-03-27 19:30:41 +00:00
Shannon Booth
b17746eb94 Tests/LibWeb: Fix file path for crash test script src
Simply meaning the test would never get the internals object.
2025-02-10 09:25:09 +00:00
Andreas Kling
51a91771b8 LibJS+LibGC: Run FinalizationRegistry cleanup host hook *after* GC
Before this change, it was possible for a second GC to get triggered
in the middle of a first GC, due to allocations happening in the
FinalizationRegistry cleanup host hook. To avoid this causing problems,
we add a "post-GC task" mechanism and use that to invoke the host hook
once all other GC activity is finished, and we've unset the "collecting
garbage" flag.

Note that the test included here only fails reliably when running with
the -g flag (collect garbage after each allocation).

Fixes #3051
2025-01-23 12:10:21 +01:00