mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-12 20:42:21 +00:00
LibWeb: Call requestAnimationFrame() callback with undefined this value
We were leaking an empty value via the callback's this value: requestAnimationFrame(function () { this; // <-- empty value });
This commit is contained in:
parent
49a062f81d
commit
056ffa4abb
Notes:
sideshowbarker
2024-07-18 21:03:40 +09:00
Author: https://github.com/linusg
Commit: 056ffa4abb
Pull-request: https://github.com/SerenityOS/serenity/pull/5963
1 changed files with 1 additions and 1 deletions
|
@ -140,7 +140,7 @@ i32 Window::request_animation_frame(JS::Function& callback)
|
|||
auto& function = const_cast<JS::Function&>(static_cast<const JS::Function&>(*handle.cell()));
|
||||
auto& vm = function.vm();
|
||||
fake_timestamp += 10;
|
||||
[[maybe_unused]] auto rc = vm.call(function, {}, JS::Value(fake_timestamp));
|
||||
[[maybe_unused]] auto rc = vm.call(function, JS::js_undefined(), JS::Value(fake_timestamp));
|
||||
if (vm.exception())
|
||||
vm.clear_exception();
|
||||
GUI::DisplayLink::unregister_callback(link_id);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue