mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 22:57:44 +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
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