mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 01:37:35 +00:00
LibWeb: Don't set EventTarget prototype on any WindowOrWorkerGlobalScope
The same limitations regarding construction of Window apply to all WorkerGlobalScope classes as well.
This commit is contained in:
parent
4fcff01ef3
commit
5586340cf3
1 changed files with 2 additions and 2 deletions
|
@ -56,9 +56,9 @@ void EventTarget::initialize(JS::Realm& realm)
|
|||
{
|
||||
Base::initialize(realm);
|
||||
|
||||
// FIXME: We can't do this for HTML::Window currently, as this will run when creating the initial global object.
|
||||
// FIXME: We can't do this for HTML::Window or HTML::WorkerGlobalScope, as this will run when creating the initial global object.
|
||||
// During this time, the ESO is not setup, so it will cause a nullptr dereference in host_defined_intrinsics.
|
||||
if (!is<HTML::Window>(this))
|
||||
if (!is<HTML::WindowOrWorkerGlobalScopeMixin>(this))
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::EventTargetPrototype>(realm, "EventTarget"));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue