summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/WebAssembly
diff options
context:
space:
mode:
authorIdan Horowitz <idan.horowitz@gmail.com>2021-07-06 01:12:54 +0300
committerLinus Groh <mail@linusgroh.de>2021-07-06 14:20:30 +0100
commit53f70e520889a58a75e243cb93ed14f08416cf8a (patch)
tree3054922ec60641a56e3ecdc2e8442fa746ad6a0b /Userland/Libraries/LibWeb/WebAssembly
parenta6b8291a9b3f72c6c70141dafb85d380a68ebdd0 (diff)
downloadserenity-53f70e520889a58a75e243cb93ed14f08416cf8a.zip
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.
Diffstat (limited to 'Userland/Libraries/LibWeb/WebAssembly')
-rw-r--r--Userland/Libraries/LibWeb/WebAssembly/WebAssemblyInstanceObjectPrototype.cpp2
-rw-r--r--Userland/Libraries/LibWeb/WebAssembly/WebAssemblyMemoryPrototype.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyInstanceObjectPrototype.cpp b/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyInstanceObjectPrototype.cpp
index 8eaf4e1251..91fe6541ac 100644
--- a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyInstanceObjectPrototype.cpp
+++ b/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyInstanceObjectPrototype.cpp
@@ -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)
diff --git a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyMemoryPrototype.cpp b/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyMemoryPrototype.cpp
index d98b384636..0655cdcc3a 100644
--- a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyMemoryPrototype.cpp
+++ b/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyMemoryPrototype.cpp
@@ -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)