mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:17:45 +00:00
LibJS: Use Function as callback type in define_native_function/accessor
There is not need to use SafeFunction because define_native_function or define_native_accessor will pass callback forward to NativeFunction that uses HeapFunction to visit it.
This commit is contained in:
parent
84f845494e
commit
3a1f617fbf
2 changed files with 4 additions and 4 deletions
|
@ -166,8 +166,8 @@ public:
|
|||
using IntrinsicAccessor = Value (*)(Realm&);
|
||||
void define_intrinsic_accessor(PropertyKey const&, PropertyAttributes attributes, IntrinsicAccessor accessor);
|
||||
|
||||
void define_native_function(Realm&, PropertyKey const&, SafeFunction<ThrowCompletionOr<Value>(VM&)>, i32 length, PropertyAttributes attributes);
|
||||
void define_native_accessor(Realm&, PropertyKey const&, SafeFunction<ThrowCompletionOr<Value>(VM&)> getter, SafeFunction<ThrowCompletionOr<Value>(VM&)> setter, PropertyAttributes attributes);
|
||||
void define_native_function(Realm&, PropertyKey const&, Function<ThrowCompletionOr<Value>(VM&)>, i32 length, PropertyAttributes attributes);
|
||||
void define_native_accessor(Realm&, PropertyKey const&, Function<ThrowCompletionOr<Value>(VM&)> getter, Function<ThrowCompletionOr<Value>(VM&)> setter, PropertyAttributes attributes);
|
||||
|
||||
virtual bool is_dom_node() const { return false; }
|
||||
virtual bool is_function() const { return false; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue