diff options
author | Andreas Kling <kling@serenityos.org> | 2022-08-08 22:29:40 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-09-06 00:27:09 +0200 |
commit | 7c3db526b0b7a9f516499b00e901ec55c695c02e (patch) | |
tree | ce8243216d2b0446c35447db92d7991a1439e626 /Userland/Libraries/LibWeb/HTML/Worker.cpp | |
parent | a4ddb0ef8746be22b07fce3cc67b9664a4bd01ef (diff) | |
download | serenity-7c3db526b0b7a9f516499b00e901ec55c695c02e.zip |
LibWeb: Make DOM::Event and all its subclasses GC-allocated
Diffstat (limited to 'Userland/Libraries/LibWeb/HTML/Worker.cpp')
-rw-r--r-- | Userland/Libraries/LibWeb/HTML/Worker.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Userland/Libraries/LibWeb/HTML/Worker.cpp b/Userland/Libraries/LibWeb/HTML/Worker.cpp index 0dc8b821be..438ec11308 100644 --- a/Userland/Libraries/LibWeb/HTML/Worker.cpp +++ b/Userland/Libraries/LibWeb/HTML/Worker.cpp @@ -148,7 +148,8 @@ void Worker::run_a_worker(AK::URL& url, EnvironmentSettingsObject& outside_setti MessageEventInit event_init {}; event_init.data = message; event_init.origin = "<origin>"; - dispatch_event(MessageEvent::create(HTML::EventNames::message, event_init)); + // FIXME: The cast here is totally bogus, since workers don't have a WindowObject.. + dispatch_event(*MessageEvent::create(verify_cast<Bindings::WindowObject>(*m_worker_scope), HTML::EventNames::message, event_init)); })); return JS::js_undefined(); |