Switch mimalloc guards to assertions

The thin mimalloc API is currently defensive around incorrect setup/teardown by
guarding against using/destroying the arena when the heap is null, or creating
an arena when it already exists.

The only time these checks will fail is when the code is wrong, e.g. trying
to use libdom before or after freeing the arena. The current behavior can mask
these errors, plus add runtime overhead.
This commit is contained in:
Karl Seguin
2025-08-31 19:35:53 +08:00
parent f66f4d9aeb
commit b2cf5df612
4 changed files with 18 additions and 18 deletions

View File

@@ -121,7 +121,6 @@ const TestContext = struct {
if (opts.html) |html| {
if (bc.session_id == null) bc.session_id = "SID-X";
parser.deinit();
const page = try bc.session.createPage();
page.window.document = (try Document.init(html)).doc;
}