summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/HTML/MessageChannel.h
diff options
context:
space:
mode:
authorLuke Wilde <lukew@serenityos.org>2021-10-14 18:03:08 +0100
committerLinus Groh <mail@linusgroh.de>2022-02-08 17:47:44 +0000
commit5aacec65ab6da8feb5d2f29405ef4ed3cd89501f (patch)
tree2845921fb0bba58c40dc89acad0e9918657cc596 /Userland/Libraries/LibWeb/HTML/MessageChannel.h
parent3bb5c6207fbdbe80041bd603882063165b440e00 (diff)
downloadserenity-5aacec65ab6da8feb5d2f29405ef4ed3cd89501f.zip
LibWeb: Rewrite EventTarget to more closely match the spec
This isn't perfect (especially the global object situation in activate_event_handler), but I believe it's in a much more complete state now :^) This fixes the issue of crashing in prepare_for_ordinary_call with the `i < m_size` crash, as it now uses the IDL callback functions which requires the Environment Settings Object. The environment settings object for the callback is fetched at the time the callback is created, for example, WrapperGenerator gets the incumbent settings object for the callback at the time of wrapping. This allows us to remove passing in ScriptExecutionContext into EventTarget's constructor. With this, we can now drop ScriptExecutionContext.
Diffstat (limited to 'Userland/Libraries/LibWeb/HTML/MessageChannel.h')
-rw-r--r--Userland/Libraries/LibWeb/HTML/MessageChannel.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/Userland/Libraries/LibWeb/HTML/MessageChannel.h b/Userland/Libraries/LibWeb/HTML/MessageChannel.h
index 9abe9b91d1..a61851d21c 100644
--- a/Userland/Libraries/LibWeb/HTML/MessageChannel.h
+++ b/Userland/Libraries/LibWeb/HTML/MessageChannel.h
@@ -24,9 +24,9 @@ public:
using RefCounted::ref;
using RefCounted::unref;
- static NonnullRefPtr<MessageChannel> create_with_global_object(Bindings::WindowObject& global_object)
+ static NonnullRefPtr<MessageChannel> create_with_global_object(Bindings::WindowObject&)
{
- return adopt_ref(*new MessageChannel(global_object));
+ return adopt_ref(*new MessageChannel());
}
virtual ~MessageChannel() override;
@@ -38,7 +38,7 @@ public:
MessagePort const* port2() const { return m_port2; }
private:
- explicit MessageChannel(Bindings::WindowObject&);
+ MessageChannel();
RefPtr<MessagePort> m_port1;
RefPtr<MessagePort> m_port2;