mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 04:47:34 +00:00
LibJS: Remove the default length & attributes from define_native_*
These are usually incorrect, and people sometimes forget to add the correct values as a result of them being optional, so they should just be specified explicitly.
This commit is contained in:
parent
a6b8291a9b
commit
53f70e5208
10 changed files with 48 additions and 43 deletions
|
@ -12,7 +12,7 @@ namespace Web::Bindings {
|
|||
void WebAssemblyInstancePrototype::initialize(JS::GlobalObject& global_object)
|
||||
{
|
||||
Object::initialize(global_object);
|
||||
define_native_accessor("exports", exports_getter, {});
|
||||
define_native_accessor("exports", exports_getter, {}, JS::Attribute::Enumerable | JS::Attribute::Configurable);
|
||||
}
|
||||
|
||||
JS_DEFINE_NATIVE_FUNCTION(WebAssemblyInstancePrototype::exports_getter)
|
||||
|
|
|
@ -13,8 +13,8 @@ namespace Web::Bindings {
|
|||
void WebAssemblyMemoryPrototype::initialize(JS::GlobalObject& global_object)
|
||||
{
|
||||
Object::initialize(global_object);
|
||||
define_native_accessor("buffer", buffer_getter, {});
|
||||
define_native_function("grow", grow);
|
||||
define_native_accessor("buffer", buffer_getter, {}, JS::Attribute::Enumerable | JS::Attribute::Configurable);
|
||||
define_native_function("grow", grow, 1, JS::Attribute::Writable | JS::Attribute::Enumerable | JS::Attribute::Configurable);
|
||||
}
|
||||
|
||||
JS_DEFINE_NATIVE_FUNCTION(WebAssemblyMemoryPrototype::grow)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue