1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 01:37:35 +00:00

LibWeb: Always put a dummy execution context on the main thread VM stack

A lot of code assumes that there's a current execution context. By
setting up a dummy context right after creating the main thread VM,
we ensure that such code can always run.
This commit is contained in:
Andreas Kling 2022-08-04 20:16:40 +02:00
parent 2801ddfa76
commit eca0873245
2 changed files with 8 additions and 0 deletions

View file

@ -29,6 +29,8 @@ struct WebEngineCustomData final : public JS::VM::CustomData {
// https://dom.spec.whatwg.org/#mutation-observer-list
// FIXME: This should be a set.
NonnullRefPtrVector<DOM::MutationObserver> mutation_observers;
OwnPtr<JS::ExecutionContext> root_execution_context;
};
struct WebEngineCustomJobCallbackData final : public JS::JobCallback::CustomData {