1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 08:57:47 +00:00

LibWeb: Hang on to the internal realm with a JS::Handle

This fixes an issue where GC would kill the internal realm if it ran at
the wrong time during startup. Found by aggressively GC'ing between
every allocation.
This commit is contained in:
Andreas Kling 2022-10-17 10:55:16 +02:00
parent 6e0f80fbe0
commit 2898701459
2 changed files with 3 additions and 0 deletions

View file

@ -32,6 +32,8 @@ struct WebEngineCustomData final : public JS::VM::CustomData {
// FIXME: This should be a set.
Vector<JS::Handle<DOM::MutationObserver>> mutation_observers;
JS::Handle<JS::Realm> internal_realm;
OwnPtr<JS::ExecutionContext> root_execution_context;
};