diff options
author | Andreas Kling <kling@serenityos.org> | 2022-08-08 14:12:01 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-09-06 00:27:09 +0200 |
commit | 8cda70c892c029478e9b87c909b752e000050b38 (patch) | |
tree | 6b0686ffeb8c79cf17887cd252bde228b49ab2fb /Userland/Libraries/LibWeb/HTML/Window.h | |
parent | 967a3e5a45af23f7922cffab9d77c0870ecbf3f2 (diff) | |
download | serenity-8cda70c892c029478e9b87c909b752e000050b38.zip |
LibWeb: Move event listeners, handlers and callbacks to the GC heap
This patch moves the following things to being GC-allocated:
- Bindings::CallbackType
- HTML::EventHandler
- DOM::IDLEventListener
- DOM::DOMEventListener
- DOM::NodeFilter
Note that we only use PlatformObject for things that might be exposed
to web content. Anything that is only used internally inherits directly
from JS::Cell instead, making them a bit more lightweight.
Diffstat (limited to 'Userland/Libraries/LibWeb/HTML/Window.h')
-rw-r--r-- | Userland/Libraries/LibWeb/HTML/Window.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Userland/Libraries/LibWeb/HTML/Window.h b/Userland/Libraries/LibWeb/HTML/Window.h index be5b9793ed..e3d8c467e7 100644 --- a/Userland/Libraries/LibWeb/HTML/Window.h +++ b/Userland/Libraries/LibWeb/HTML/Window.h @@ -61,7 +61,7 @@ public: void alert(String const&); bool confirm(String const&); String prompt(String const&, String const&); - i32 request_animation_frame(NonnullOwnPtr<Bindings::CallbackType> js_callback); + i32 request_animation_frame(Bindings::CallbackType& js_callback); void cancel_animation_frame(i32); bool has_animation_frame_callbacks() const { return m_animation_frame_callback_driver.has_callbacks(); } @@ -70,7 +70,7 @@ public: void clear_timeout(i32); void clear_interval(i32); - void queue_microtask(NonnullOwnPtr<Bindings::CallbackType> callback); + void queue_microtask(Bindings::CallbackType& callback); int inner_width() const; int inner_height() const; @@ -123,7 +123,7 @@ public: void start_an_idle_period(); - u32 request_idle_callback(NonnullOwnPtr<Bindings::CallbackType> callback); + u32 request_idle_callback(Bindings::CallbackType& callback); void cancel_idle_callback(u32); AnimationFrameCallbackDriver& animation_frame_callback_driver() { return m_animation_frame_callback_driver; } |