mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-23 09:51:57 -05:00
18b9d02edd
Our setInterval implementation currently crashes on DuckDuckGo when it's invoked with a string argument. In this path, we were creating a native function to evaluate and execute that string. That evaluation was always returning a Completion, but NativeFunction expects ThrowCompletionOr. The conversion from Completion to ThrowCompletionOr would fail a VERIFY because that conversion is only valid if the Completion is an error; but we would trigger this conversion even on success. This change re-implements setTimeout & setInterval in direct accordance with the spec. So we avoid making that NativeFunction altogether, and DDG can progress past its invocation to the timer. With this change, we also have other features we did not previously support, such as passing any number of arguments to the timers. This does not implement handling of nesting levels yet. |
||
---|---|---|
.. | ||
Applets | ||
Applications | ||
Demos | ||
DevTools | ||
DynamicLoader | ||
Games | ||
Libraries | ||
Services | ||
Shell | ||
Utilities | ||
CMakeLists.txt |