mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-25 09:00:22 +00:00
LibJS: Remove unused argument in NativeFunction constructor
This commit is contained in:
parent
32d0d00ab2
commit
4036ff9d91
Notes:
sideshowbarker
2024-07-19 02:19:36 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/4036ff9d918
3 changed files with 3 additions and 3 deletions
|
@ -31,7 +31,7 @@
|
|||
|
||||
namespace JS {
|
||||
|
||||
NativeFunction* NativeFunction::create(Interpreter&, GlobalObject& global_object, const FlyString& name, AK::Function<Value(Interpreter&, GlobalObject&)> function)
|
||||
NativeFunction* NativeFunction::create(GlobalObject& global_object, const FlyString& name, AK::Function<Value(Interpreter&, GlobalObject&)> function)
|
||||
{
|
||||
return global_object.heap().allocate<NativeFunction>(global_object, name, move(function), *global_object.function_prototype());
|
||||
}
|
||||
|
|
|
@ -35,7 +35,7 @@ class NativeFunction : public Function {
|
|||
JS_OBJECT(NativeFunction, Function);
|
||||
|
||||
public:
|
||||
static NativeFunction* create(Interpreter&, GlobalObject&, const FlyString& name, AK::Function<Value(Interpreter&, GlobalObject&)>);
|
||||
static NativeFunction* create(GlobalObject&, const FlyString& name, AK::Function<Value(Interpreter&, GlobalObject&)>);
|
||||
|
||||
explicit NativeFunction(const FlyString& name, AK::Function<Value(Interpreter&, GlobalObject&)>, Object& prototype);
|
||||
virtual void initialize(GlobalObject&) override { }
|
||||
|
|
|
@ -750,7 +750,7 @@ bool Object::define_native_function(const StringOrSymbol& property_name, AK::Fun
|
|||
} else {
|
||||
function_name = String::format("[%s]", property_name.as_symbol()->description().characters());
|
||||
}
|
||||
auto* function = NativeFunction::create(interpreter(), global_object(), function_name, move(native_function));
|
||||
auto* function = NativeFunction::create(global_object(), function_name, move(native_function));
|
||||
function->define_property("length", Value(length), Attribute::Configurable);
|
||||
if (interpreter().exception())
|
||||
return {};
|
||||
|
|
Loading…
Reference in a new issue