mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 08:36:15 +00:00
LibJS: Make Function and CallFrame aware of their function name
This commit is contained in:
committed by
Andreas Kling
parent
4eceea7c62
commit
eece424694
@@ -235,7 +235,7 @@ void Object::put(PropertyName property_name, Value value)
|
||||
|
||||
void Object::put_native_function(const FlyString& property_name, AK::Function<Value(Interpreter&)> native_function, i32 length)
|
||||
{
|
||||
auto* function = heap().allocate<NativeFunction>(move(native_function));
|
||||
auto* function = heap().allocate<NativeFunction>(property_name, move(native_function));
|
||||
function->put("length", Value(length));
|
||||
put(property_name, function);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user