mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 13:19:05 +00:00
LibJS: Implement Function.prototype.bind()
This commit is contained in:
parent
b3800829da
commit
1fa0c7304d
Notes:
sideshowbarker
2024-07-19 07:25:18 +09:00
Author: https://github.com/jack-karamanian
Commit: 1fa0c7304d
Pull-request: https://github.com/SerenityOS/serenity/pull/1863
Reviewed-by: https://github.com/awesomekling
Reviewed-by: https://github.com/linusg
10 changed files with 317 additions and 6 deletions
|
@ -114,9 +114,8 @@ Value CallExpression::execute(Interpreter& interpreter) const
|
|||
auto& function = static_cast<Function&>(callee.as_object());
|
||||
|
||||
MarkedValueList arguments(interpreter.heap());
|
||||
for (auto bound_argument : function.bound_arguments()) {
|
||||
arguments.append(bound_argument);
|
||||
}
|
||||
arguments.values().append(function.bound_arguments());
|
||||
|
||||
for (size_t i = 0; i < m_arguments.size(); ++i) {
|
||||
auto value = m_arguments[i].execute(interpreter);
|
||||
if (interpreter.exception())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue