summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
Diffstat (limited to 'Userland')
-rw-r--r--Userland/Libraries/LibJS/Runtime/ArrayBufferConstructor.cpp2
-rw-r--r--Userland/Libraries/LibJS/Runtime/ArrayBufferConstructor.h2
-rw-r--r--Userland/Libraries/LibJS/Runtime/ArrayBufferPrototype.cpp2
-rw-r--r--Userland/Libraries/LibJS/Runtime/ArrayBufferPrototype.h2
-rw-r--r--Userland/Libraries/LibJS/Runtime/ArrayConstructor.cpp2
-rw-r--r--Userland/Libraries/LibJS/Runtime/ArrayConstructor.h2
-rw-r--r--Userland/Libraries/LibJS/Runtime/DataViewPrototype.cpp6
-rw-r--r--Userland/Libraries/LibJS/Runtime/DataViewPrototype.h6
-rw-r--r--Userland/Libraries/LibJS/Runtime/Intl/LocalePrototype.cpp12
-rw-r--r--Userland/Libraries/LibJS/Runtime/Intl/LocalePrototype.h20
-rw-r--r--Userland/Libraries/LibJS/Runtime/MapConstructor.cpp2
-rw-r--r--Userland/Libraries/LibJS/Runtime/MapConstructor.h2
-rw-r--r--Userland/Libraries/LibJS/Runtime/MapPrototype.cpp2
-rw-r--r--Userland/Libraries/LibJS/Runtime/MapPrototype.h2
-rw-r--r--Userland/Libraries/LibJS/Runtime/PromiseConstructor.cpp2
-rw-r--r--Userland/Libraries/LibJS/Runtime/PromiseConstructor.h2
-rw-r--r--Userland/Libraries/LibJS/Runtime/RegExpConstructor.cpp2
-rw-r--r--Userland/Libraries/LibJS/Runtime/RegExpConstructor.h2
-rw-r--r--Userland/Libraries/LibJS/Runtime/RegExpPrototype.cpp6
-rw-r--r--Userland/Libraries/LibJS/Runtime/RegExpPrototype.h6
-rw-r--r--Userland/Libraries/LibJS/Runtime/SetConstructor.cpp2
-rw-r--r--Userland/Libraries/LibJS/Runtime/SetConstructor.h2
-rw-r--r--Userland/Libraries/LibJS/Runtime/SetPrototype.cpp2
-rw-r--r--Userland/Libraries/LibJS/Runtime/SetPrototype.h2
-rw-r--r--Userland/Libraries/LibJS/Runtime/SymbolPrototype.cpp2
-rw-r--r--Userland/Libraries/LibJS/Runtime/SymbolPrototype.h2
-rw-r--r--Userland/Libraries/LibJS/Runtime/TypedArrayConstructor.cpp2
-rw-r--r--Userland/Libraries/LibJS/Runtime/TypedArrayConstructor.h2
-rw-r--r--Userland/Libraries/LibJS/Runtime/TypedArrayPrototype.cpp8
-rw-r--r--Userland/Libraries/LibJS/Runtime/TypedArrayPrototype.h8
-rw-r--r--Userland/Libraries/LibWeb/Bindings/WindowObject.cpp12
-rw-r--r--Userland/Libraries/LibWeb/Bindings/WindowObject.h12
-rw-r--r--Userland/Services/WebContent/ConsoleGlobalObject.cpp2
-rw-r--r--Userland/Services/WebContent/ConsoleGlobalObject.h2
34 files changed, 72 insertions, 72 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/ArrayBufferConstructor.cpp b/Userland/Libraries/LibJS/Runtime/ArrayBufferConstructor.cpp
index 0367eecdea..858007d550 100644
--- a/Userland/Libraries/LibJS/Runtime/ArrayBufferConstructor.cpp
+++ b/Userland/Libraries/LibJS/Runtime/ArrayBufferConstructor.cpp
@@ -78,7 +78,7 @@ JS_DEFINE_NATIVE_FUNCTION(ArrayBufferConstructor::is_view)
}
// 25.1.4.3 get ArrayBuffer [ @@species ], https://tc39.es/ecma262/#sec-get-arraybuffer-@@species
-JS_DEFINE_NATIVE_GETTER(ArrayBufferConstructor::symbol_species_getter)
+JS_DEFINE_NATIVE_FUNCTION(ArrayBufferConstructor::symbol_species_getter)
{
return vm.this_value(global_object);
}
diff --git a/Userland/Libraries/LibJS/Runtime/ArrayBufferConstructor.h b/Userland/Libraries/LibJS/Runtime/ArrayBufferConstructor.h
index 3c1e65f219..045425a46a 100644
--- a/Userland/Libraries/LibJS/Runtime/ArrayBufferConstructor.h
+++ b/Userland/Libraries/LibJS/Runtime/ArrayBufferConstructor.h
@@ -26,7 +26,7 @@ private:
JS_DECLARE_NATIVE_FUNCTION(is_view);
- JS_DECLARE_NATIVE_GETTER(symbol_species_getter);
+ JS_DECLARE_NATIVE_FUNCTION(symbol_species_getter);
};
}
diff --git a/Userland/Libraries/LibJS/Runtime/ArrayBufferPrototype.cpp b/Userland/Libraries/LibJS/Runtime/ArrayBufferPrototype.cpp
index 767b41b4cc..a5a5ad768b 100644
--- a/Userland/Libraries/LibJS/Runtime/ArrayBufferPrototype.cpp
+++ b/Userland/Libraries/LibJS/Runtime/ArrayBufferPrototype.cpp
@@ -103,7 +103,7 @@ JS_DEFINE_NATIVE_FUNCTION(ArrayBufferPrototype::slice)
}
// 25.1.5.1 get ArrayBuffer.prototype.byteLength, https://tc39.es/ecma262/#sec-get-arraybuffer.prototype.bytelength
-JS_DEFINE_NATIVE_GETTER(ArrayBufferPrototype::byte_length_getter)
+JS_DEFINE_NATIVE_FUNCTION(ArrayBufferPrototype::byte_length_getter)
{
auto* array_buffer_object = TRY_OR_DISCARD(typed_this_value(global_object));
// FIXME: Check for shared buffer
diff --git a/Userland/Libraries/LibJS/Runtime/ArrayBufferPrototype.h b/Userland/Libraries/LibJS/Runtime/ArrayBufferPrototype.h
index 17536ac332..7dead0a111 100644
--- a/Userland/Libraries/LibJS/Runtime/ArrayBufferPrototype.h
+++ b/Userland/Libraries/LibJS/Runtime/ArrayBufferPrototype.h
@@ -21,7 +21,7 @@ public:
private:
JS_DECLARE_NATIVE_FUNCTION(slice);
- JS_DECLARE_NATIVE_GETTER(byte_length_getter);
+ JS_DECLARE_NATIVE_FUNCTION(byte_length_getter);
};
}
diff --git a/Userland/Libraries/LibJS/Runtime/ArrayConstructor.cpp b/Userland/Libraries/LibJS/Runtime/ArrayConstructor.cpp
index 4185fc4c95..d8567e2c97 100644
--- a/Userland/Libraries/LibJS/Runtime/ArrayConstructor.cpp
+++ b/Userland/Libraries/LibJS/Runtime/ArrayConstructor.cpp
@@ -230,7 +230,7 @@ JS_DEFINE_NATIVE_FUNCTION(ArrayConstructor::of)
}
// 23.1.2.5 get Array [ @@species ], https://tc39.es/ecma262/#sec-get-array-@@species
-JS_DEFINE_NATIVE_GETTER(ArrayConstructor::symbol_species_getter)
+JS_DEFINE_NATIVE_FUNCTION(ArrayConstructor::symbol_species_getter)
{
return vm.this_value(global_object);
}
diff --git a/Userland/Libraries/LibJS/Runtime/ArrayConstructor.h b/Userland/Libraries/LibJS/Runtime/ArrayConstructor.h
index 191c5b59df..6bc6f33510 100644
--- a/Userland/Libraries/LibJS/Runtime/ArrayConstructor.h
+++ b/Userland/Libraries/LibJS/Runtime/ArrayConstructor.h
@@ -28,7 +28,7 @@ private:
JS_DECLARE_NATIVE_FUNCTION(is_array);
JS_DECLARE_NATIVE_FUNCTION(of);
- JS_DECLARE_NATIVE_GETTER(symbol_species_getter);
+ JS_DECLARE_NATIVE_FUNCTION(symbol_species_getter);
};
}
diff --git a/Userland/Libraries/LibJS/Runtime/DataViewPrototype.cpp b/Userland/Libraries/LibJS/Runtime/DataViewPrototype.cpp
index b812a9d35d..f5d8523bd5 100644
--- a/Userland/Libraries/LibJS/Runtime/DataViewPrototype.cpp
+++ b/Userland/Libraries/LibJS/Runtime/DataViewPrototype.cpp
@@ -241,14 +241,14 @@ JS_DEFINE_NATIVE_FUNCTION(DataViewPrototype::set_uint_32)
}
// 25.3.4.1 get DataView.prototype.buffer, https://tc39.es/ecma262/#sec-get-dataview.prototype.buffer
-JS_DEFINE_NATIVE_GETTER(DataViewPrototype::buffer_getter)
+JS_DEFINE_NATIVE_FUNCTION(DataViewPrototype::buffer_getter)
{
auto* data_view = TRY_OR_DISCARD(typed_this_value(global_object));
return data_view->viewed_array_buffer();
}
// 25.3.4.2 get DataView.prototype.byteLength, https://tc39.es/ecma262/#sec-get-dataview.prototype.bytelength
-JS_DEFINE_NATIVE_GETTER(DataViewPrototype::byte_length_getter)
+JS_DEFINE_NATIVE_FUNCTION(DataViewPrototype::byte_length_getter)
{
auto* data_view = TRY_OR_DISCARD(typed_this_value(global_object));
if (data_view->viewed_array_buffer()->is_detached()) {
@@ -259,7 +259,7 @@ JS_DEFINE_NATIVE_GETTER(DataViewPrototype::byte_length_getter)
}
// 25.3.4.3 get DataView.prototype.byteOffset, https://tc39.es/ecma262/#sec-get-dataview.prototype.byteoffset
-JS_DEFINE_NATIVE_GETTER(DataViewPrototype::byte_offset_getter)
+JS_DEFINE_NATIVE_FUNCTION(DataViewPrototype::byte_offset_getter)
{
auto* data_view = TRY_OR_DISCARD(typed_this_value(global_object));
if (data_view->viewed_array_buffer()->is_detached()) {
diff --git a/Userland/Libraries/LibJS/Runtime/DataViewPrototype.h b/Userland/Libraries/LibJS/Runtime/DataViewPrototype.h
index 839719c43b..4c098f4290 100644
--- a/Userland/Libraries/LibJS/Runtime/DataViewPrototype.h
+++ b/Userland/Libraries/LibJS/Runtime/DataViewPrototype.h
@@ -41,9 +41,9 @@ private:
JS_DECLARE_NATIVE_FUNCTION(set_uint_16);
JS_DECLARE_NATIVE_FUNCTION(set_uint_32);
- JS_DECLARE_NATIVE_GETTER(buffer_getter);
- JS_DECLARE_NATIVE_GETTER(byte_length_getter);
- JS_DECLARE_NATIVE_GETTER(byte_offset_getter);
+ JS_DECLARE_NATIVE_FUNCTION(buffer_getter);
+ JS_DECLARE_NATIVE_FUNCTION(byte_length_getter);
+ JS_DECLARE_NATIVE_FUNCTION(byte_offset_getter);
};
}
diff --git a/Userland/Libraries/LibJS/Runtime/Intl/LocalePrototype.cpp b/Userland/Libraries/LibJS/Runtime/Intl/LocalePrototype.cpp
index 81f07afecd..e81a942578 100644
--- a/Userland/Libraries/LibJS/Runtime/Intl/LocalePrototype.cpp
+++ b/Userland/Libraries/LibJS/Runtime/Intl/LocalePrototype.cpp
@@ -92,7 +92,7 @@ JS_DEFINE_NATIVE_FUNCTION(LocalePrototype::to_string)
}
// 14.3.6 get Intl.Locale.prototype.baseName, https://tc39.es/ecma402/#sec-Intl.Locale.prototype.baseName
-JS_DEFINE_NATIVE_GETTER(LocalePrototype::base_name)
+JS_DEFINE_NATIVE_FUNCTION(LocalePrototype::base_name)
{
// 1. Let loc be the this value.
// 2. Perform ? RequireInternalSlot(loc, [[InitializedLocale]]).
@@ -119,7 +119,7 @@ JS_DEFINE_NATIVE_GETTER(LocalePrototype::base_name)
// 14.3.10 get Intl.Locale.prototype.hourCycle, https://tc39.es/ecma402/#sec-Intl.Locale.prototype.hourCycle
// 14.3.12 get Intl.Locale.prototype.numberingSystem, https://tc39.es/ecma402/#sec-Intl.Locale.prototype.numberingSystem
#define __JS_ENUMERATE(keyword) \
- JS_DEFINE_NATIVE_GETTER(LocalePrototype::keyword) \
+ JS_DEFINE_NATIVE_FUNCTION(LocalePrototype::keyword) \
{ \
auto* locale_object = TRY_OR_DISCARD(typed_this_object(global_object)); \
if (!locale_object->has_##keyword()) \
@@ -130,7 +130,7 @@ JS_ENUMERATE_LOCALE_KEYWORD_PROPERTIES
#undef __JS_ENUMERATE
// 14.3.11 get Intl.Locale.prototype.numeric, https://tc39.es/ecma402/#sec-Intl.Locale.prototype.numeric
-JS_DEFINE_NATIVE_GETTER(LocalePrototype::numeric)
+JS_DEFINE_NATIVE_FUNCTION(LocalePrototype::numeric)
{
// 1. Let loc be the this value.
// 2. Perform ? RequireInternalSlot(loc, [[InitializedLocale]]).
@@ -141,7 +141,7 @@ JS_DEFINE_NATIVE_GETTER(LocalePrototype::numeric)
}
// 14.3.13 get Intl.Locale.prototype.language, https://tc39.es/ecma402/#sec-Intl.Locale.prototype.language
-JS_DEFINE_NATIVE_GETTER(LocalePrototype::language)
+JS_DEFINE_NATIVE_FUNCTION(LocalePrototype::language)
{
// 1. Let loc be the this value.
// 2. Perform ? RequireInternalSlot(loc, [[InitializedLocale]]).
@@ -158,7 +158,7 @@ JS_DEFINE_NATIVE_GETTER(LocalePrototype::language)
}
// 14.3.14 get Intl.Locale.prototype.script, https://tc39.es/ecma402/#sec-Intl.Locale.prototype.script
-JS_DEFINE_NATIVE_GETTER(LocalePrototype::script)
+JS_DEFINE_NATIVE_FUNCTION(LocalePrototype::script)
{
// 1. Let loc be the this value.
// 2. Perform ? RequireInternalSlot(loc, [[InitializedLocale]]).
@@ -179,7 +179,7 @@ JS_DEFINE_NATIVE_GETTER(LocalePrototype::script)
}
// 14.3.15 get Intl.Locale.prototype.region, https://tc39.es/ecma402/#sec-Intl.Locale.prototype.region
-JS_DEFINE_NATIVE_GETTER(LocalePrototype::region)
+JS_DEFINE_NATIVE_FUNCTION(LocalePrototype::region)
{
// 1. Let loc be the this value.
// 2. Perform ? RequireInternalSlot(loc, [[InitializedLocale]]).
diff --git a/Userland/Libraries/LibJS/Runtime/Intl/LocalePrototype.h b/Userland/Libraries/LibJS/Runtime/Intl/LocalePrototype.h
index 126c12ce70..aa460a8a0a 100644
--- a/Userland/Libraries/LibJS/Runtime/Intl/LocalePrototype.h
+++ b/Userland/Libraries/LibJS/Runtime/Intl/LocalePrototype.h
@@ -24,16 +24,16 @@ private:
JS_DECLARE_NATIVE_FUNCTION(minimize);
JS_DECLARE_NATIVE_FUNCTION(to_string);
- JS_DECLARE_NATIVE_GETTER(base_name);
- JS_DECLARE_NATIVE_GETTER(calendar);
- JS_DECLARE_NATIVE_GETTER(case_first);
- JS_DECLARE_NATIVE_GETTER(collation);
- JS_DECLARE_NATIVE_GETTER(hour_cycle);
- JS_DECLARE_NATIVE_GETTER(numbering_system);
- JS_DECLARE_NATIVE_GETTER(numeric);
- JS_DECLARE_NATIVE_GETTER(language);
- JS_DECLARE_NATIVE_GETTER(script);
- JS_DECLARE_NATIVE_GETTER(region);
+ JS_DECLARE_NATIVE_FUNCTION(base_name);
+ JS_DECLARE_NATIVE_FUNCTION(calendar);
+ JS_DECLARE_NATIVE_FUNCTION(case_first);
+ JS_DECLARE_NATIVE_FUNCTION(collation);
+ JS_DECLARE_NATIVE_FUNCTION(hour_cycle);
+ JS_DECLARE_NATIVE_FUNCTION(numbering_system);
+ JS_DECLARE_NATIVE_FUNCTION(numeric);
+ JS_DECLARE_NATIVE_FUNCTION(language);
+ JS_DECLARE_NATIVE_FUNCTION(script);
+ JS_DECLARE_NATIVE_FUNCTION(region);
};
}
diff --git a/Userland/Libraries/LibJS/Runtime/MapConstructor.cpp b/Userland/Libraries/LibJS/Runtime/MapConstructor.cpp
index 912ab36c48..fa5c52f162 100644
--- a/Userland/Libraries/LibJS/Runtime/MapConstructor.cpp
+++ b/Userland/Libraries/LibJS/Runtime/MapConstructor.cpp
@@ -83,7 +83,7 @@ Value MapConstructor::construct(FunctionObject& new_target)
}
// 24.1.2.2 get Map [ @@species ], https://tc39.es/ecma262/#sec-get-map-@@species
-JS_DEFINE_NATIVE_GETTER(MapConstructor::symbol_species_getter)
+JS_DEFINE_NATIVE_FUNCTION(MapConstructor::symbol_species_getter)
{
return vm.this_value(global_object);
}
diff --git a/Userland/Libraries/LibJS/Runtime/MapConstructor.h b/Userland/Libraries/LibJS/Runtime/MapConstructor.h
index e24bf64f9b..f507a205dc 100644
--- a/Userland/Libraries/LibJS/Runtime/MapConstructor.h
+++ b/Userland/Libraries/LibJS/Runtime/MapConstructor.h
@@ -24,7 +24,7 @@ public:
private:
virtual bool has_constructor() const override { return true; }
- JS_DECLARE_NATIVE_GETTER(symbol_species_getter);
+ JS_DECLARE_NATIVE_FUNCTION(symbol_species_getter);
};
}
diff --git a/Userland/Libraries/LibJS/Runtime/MapPrototype.cpp b/Userland/Libraries/LibJS/Runtime/MapPrototype.cpp
index d984c5f49a..e5501541d8 100644
--- a/Userland/Libraries/LibJS/Runtime/MapPrototype.cpp
+++ b/Userland/Libraries/LibJS/Runtime/MapPrototype.cpp
@@ -128,7 +128,7 @@ JS_DEFINE_NATIVE_FUNCTION(MapPrototype::values)
}
// 24.1.3.10 get Map.prototype.size, https://tc39.es/ecma262/#sec-get-map.prototype.size
-JS_DEFINE_NATIVE_GETTER(MapPrototype::size_getter)
+JS_DEFINE_NATIVE_FUNCTION(MapPrototype::size_getter)
{
auto* map = TRY_OR_DISCARD(typed_this_object(global_object));
return Value(map->entries().size());
diff --git a/Userland/Libraries/LibJS/Runtime/MapPrototype.h b/Userland/Libraries/LibJS/Runtime/MapPrototype.h
index 93f0628e9c..d7b4e74c2e 100644
--- a/Userland/Libraries/LibJS/Runtime/MapPrototype.h
+++ b/Userland/Libraries/LibJS/Runtime/MapPrototype.h
@@ -30,7 +30,7 @@ private:
JS_DECLARE_NATIVE_FUNCTION(set);
JS_DECLARE_NATIVE_FUNCTION(values);
- JS_DECLARE_NATIVE_GETTER(size_getter);
+ JS_DECLARE_NATIVE_FUNCTION(size_getter);
};
}
diff --git a/Userland/Libraries/LibJS/Runtime/PromiseConstructor.cpp b/Userland/Libraries/LibJS/Runtime/PromiseConstructor.cpp
index 7ca4096e0c..3a71cae95f 100644
--- a/Userland/Libraries/LibJS/Runtime/PromiseConstructor.cpp
+++ b/Userland/Libraries/LibJS/Runtime/PromiseConstructor.cpp
@@ -409,7 +409,7 @@ JS_DEFINE_NATIVE_FUNCTION(PromiseConstructor::resolve)
}
// 27.2.4.8 get Promise [ @@species ], https://tc39.es/ecma262/#sec-get-promise-@@species
-JS_DEFINE_NATIVE_GETTER(PromiseConstructor::symbol_species_getter)
+JS_DEFINE_NATIVE_FUNCTION(PromiseConstructor::symbol_species_getter)
{
return vm.this_value(global_object);
}
diff --git a/Userland/Libraries/LibJS/Runtime/PromiseConstructor.h b/Userland/Libraries/LibJS/Runtime/PromiseConstructor.h
index 689df76a3a..02230c2304 100644
--- a/Userland/Libraries/LibJS/Runtime/PromiseConstructor.h
+++ b/Userland/Libraries/LibJS/Runtime/PromiseConstructor.h
@@ -31,7 +31,7 @@ private:
JS_DECLARE_NATIVE_FUNCTION(reject);
JS_DECLARE_NATIVE_FUNCTION(resolve);
- JS_DECLARE_NATIVE_GETTER(symbol_species_getter);
+ JS_DECLARE_NATIVE_FUNCTION(symbol_species_getter);
};
}
diff --git a/Userland/Libraries/LibJS/Runtime/RegExpConstructor.cpp b/Userland/Libraries/LibJS/Runtime/RegExpConstructor.cpp
index 8a56572ff5..02861b2017 100644
--- a/Userland/Libraries/LibJS/Runtime/RegExpConstructor.cpp
+++ b/Userland/Libraries/LibJS/Runtime/RegExpConstructor.cpp
@@ -92,7 +92,7 @@ Value RegExpConstructor::construct(FunctionObject&)
}
// 22.2.4.2 get RegExp [ @@species ], https://tc39.es/ecma262/#sec-get-regexp-@@species
-JS_DEFINE_NATIVE_GETTER(RegExpConstructor::symbol_species_getter)
+JS_DEFINE_NATIVE_FUNCTION(RegExpConstructor::symbol_species_getter)
{
return vm.this_value(global_object);
}
diff --git a/Userland/Libraries/LibJS/Runtime/RegExpConstructor.h b/Userland/Libraries/LibJS/Runtime/RegExpConstructor.h
index d32ba1438a..1068c53947 100644
--- a/Userland/Libraries/LibJS/Runtime/RegExpConstructor.h
+++ b/Userland/Libraries/LibJS/Runtime/RegExpConstructor.h
@@ -24,7 +24,7 @@ public:
private:
virtual bool has_constructor() const override { return true; }
- JS_DECLARE_NATIVE_GETTER(symbol_species_getter);
+ JS_DECLARE_NATIVE_FUNCTION(symbol_species_getter);
};
}
diff --git a/Userland/Libraries/LibJS/Runtime/RegExpPrototype.cpp b/Userland/Libraries/LibJS/Runtime/RegExpPrototype.cpp
index b69b1d132d..759ddc088f 100644
--- a/Userland/Libraries/LibJS/Runtime/RegExpPrototype.cpp
+++ b/Userland/Libraries/LibJS/Runtime/RegExpPrototype.cpp
@@ -280,7 +280,7 @@ Value regexp_exec(GlobalObject& global_object, Object& regexp_object, Utf16Strin
// 22.2.5.14 get RegExp.prototype.sticky, https://tc39.es/ecma262/#sec-get-regexp.prototype.sticky
// 22.2.5.17 get RegExp.prototype.unicode, https://tc39.es/ecma262/#sec-get-regexp.prototype.unicode
#define __JS_ENUMERATE(flagName, flag_name, flag_char) \
- JS_DEFINE_NATIVE_GETTER(RegExpPrototype::flag_name) \
+ JS_DEFINE_NATIVE_FUNCTION(RegExpPrototype::flag_name) \
{ \
auto* regexp_object = TRY_OR_DISCARD(this_object(global_object)); \
if (!is<RegExpObject>(regexp_object)) { \
@@ -297,7 +297,7 @@ JS_ENUMERATE_REGEXP_FLAGS
#undef __JS_ENUMERATE
// 22.2.5.4 get RegExp.prototype.flags, https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
-JS_DEFINE_NATIVE_GETTER(RegExpPrototype::flags)
+JS_DEFINE_NATIVE_FUNCTION(RegExpPrototype::flags)
{
auto* regexp_object = TRY_OR_DISCARD(this_object(global_object));
StringBuilder builder(8);
@@ -313,7 +313,7 @@ JS_DEFINE_NATIVE_GETTER(RegExpPrototype::flags)
}
// 22.2.5.12 get RegExp.prototype.source, https://tc39.es/ecma262/#sec-get-regexp.prototype.source
-JS_DEFINE_NATIVE_GETTER(RegExpPrototype::source)
+JS_DEFINE_NATIVE_FUNCTION(RegExpPrototype::source)
{
auto* regexp_object = TRY_OR_DISCARD(this_object(global_object));
if (!is<RegExpObject>(regexp_object)) {
diff --git a/Userland/Libraries/LibJS/Runtime/RegExpPrototype.h b/Userland/Libraries/LibJS/Runtime/RegExpPrototype.h
index c7994ec026..b2b861ba44 100644
--- a/Userland/Libraries/LibJS/Runtime/RegExpPrototype.h
+++ b/Userland/Libraries/LibJS/Runtime/RegExpPrototype.h
@@ -24,8 +24,8 @@ public:
virtual ~RegExpPrototype() override;
private:
- JS_DECLARE_NATIVE_GETTER(flags);
- JS_DECLARE_NATIVE_GETTER(source);
+ JS_DECLARE_NATIVE_FUNCTION(flags);
+ JS_DECLARE_NATIVE_FUNCTION(source);
JS_DECLARE_NATIVE_FUNCTION(exec);
JS_DECLARE_NATIVE_FUNCTION(test);
@@ -38,7 +38,7 @@ private:
JS_DECLARE_NATIVE_FUNCTION(compile);
#define __JS_ENUMERATE(_, flag_name, ...) \
- JS_DECLARE_NATIVE_GETTER(flag_name);
+ JS_DECLARE_NATIVE_FUNCTION(flag_name);
JS_ENUMERATE_REGEXP_FLAGS
#undef __JS_ENUMERATE
};
diff --git a/Userland/Libraries/LibJS/Runtime/SetConstructor.cpp b/Userland/Libraries/LibJS/Runtime/SetConstructor.cpp
index cb17c57aa3..f1d7792c5f 100644
--- a/Userland/Libraries/LibJS/Runtime/SetConstructor.cpp
+++ b/Userland/Libraries/LibJS/Runtime/SetConstructor.cpp
@@ -71,7 +71,7 @@ Value SetConstructor::construct(FunctionObject& new_target)
}
// 24.2.2.2 get Set [ @@species ], https://tc39.es/ecma262/#sec-get-set-@@species
-JS_DEFINE_NATIVE_GETTER(SetConstructor::symbol_species_getter)
+JS_DEFINE_NATIVE_FUNCTION(SetConstructor::symbol_species_getter)
{
return vm.this_value(global_object);
}
diff --git a/Userland/Libraries/LibJS/Runtime/SetConstructor.h b/Userland/Libraries/LibJS/Runtime/SetConstructor.h
index bd1e4f12ff..4d22c932c3 100644
--- a/Userland/Libraries/LibJS/Runtime/SetConstructor.h
+++ b/Userland/Libraries/LibJS/Runtime/SetConstructor.h
@@ -24,7 +24,7 @@ public:
private:
virtual bool has_constructor() const override { return true; }
- JS_DECLARE_NATIVE_GETTER(symbol_species_getter);
+ JS_DECLARE_NATIVE_FUNCTION(symbol_species_getter);
};
}
diff --git a/Userland/Libraries/LibJS/Runtime/SetPrototype.cpp b/Userland/Libraries/LibJS/Runtime/SetPrototype.cpp
index e8ba29d391..423c91ee0c 100644
--- a/Userland/Libraries/LibJS/Runtime/SetPrototype.cpp
+++ b/Userland/Libraries/LibJS/Runtime/SetPrototype.cpp
@@ -112,7 +112,7 @@ JS_DEFINE_NATIVE_FUNCTION(SetPrototype::values)
}
// 24.2.3.9 get Set.prototype.size, https://tc39.es/ecma262/#sec-get-set.prototype.size
-JS_DEFINE_NATIVE_GETTER(SetPrototype::size_getter)
+JS_DEFINE_NATIVE_FUNCTION(SetPrototype::size_getter)
{
auto* set = TRY_OR_DISCARD(typed_this_object(global_object));
return Value(set->values().size());
diff --git a/Userland/Libraries/LibJS/Runtime/SetPrototype.h b/Userland/Libraries/LibJS/Runtime/SetPrototype.h
index 58f10634af..cefa2b7767 100644
--- a/Userland/Libraries/LibJS/Runtime/SetPrototype.h
+++ b/Userland/Libraries/LibJS/Runtime/SetPrototype.h
@@ -28,7 +28,7 @@ private:
JS_DECLARE_NATIVE_FUNCTION(has);
JS_DECLARE_NATIVE_FUNCTION(values);
- JS_DECLARE_NATIVE_GETTER(size_getter);
+ JS_DECLARE_NATIVE_FUNCTION(size_getter);
};
}
diff --git a/Userland/Libraries/LibJS/Runtime/SymbolPrototype.cpp b/Userland/Libraries/LibJS/Runtime/SymbolPrototype.cpp
index e8dc16e15e..3d8b3b04d0 100644
--- a/Userland/Libraries/LibJS/Runtime/SymbolPrototype.cpp
+++ b/Userland/Libraries/LibJS/Runtime/SymbolPrototype.cpp
@@ -53,7 +53,7 @@ static ThrowCompletionOr<Symbol*> this_symbol_value(GlobalObject& global_object,
}
// 20.4.3.2 get Symbol.prototype.description, https://tc39.es/ecma262/#sec-symbol.prototype.description
-JS_DEFINE_NATIVE_GETTER(SymbolPrototype::description_getter)
+JS_DEFINE_NATIVE_FUNCTION(SymbolPrototype::description_getter)
{
auto* symbol = TRY_OR_DISCARD(this_symbol_value(global_object, vm.this_value(global_object)));
auto& description = symbol->raw_description();
diff --git a/Userland/Libraries/LibJS/Runtime/SymbolPrototype.h b/Userland/Libraries/LibJS/Runtime/SymbolPrototype.h
index 90e9e87450..67412ad73b 100644
--- a/Userland/Libraries/LibJS/Runtime/SymbolPrototype.h
+++ b/Userland/Libraries/LibJS/Runtime/SymbolPrototype.h
@@ -19,7 +19,7 @@ public:
virtual ~SymbolPrototype() override;
private:
- JS_DECLARE_NATIVE_GETTER(description_getter);
+ JS_DECLARE_NATIVE_FUNCTION(description_getter);
JS_DECLARE_NATIVE_FUNCTION(to_string);
JS_DECLARE_NATIVE_FUNCTION(value_of);
diff --git a/Userland/Libraries/LibJS/Runtime/TypedArrayConstructor.cpp b/Userland/Libraries/LibJS/Runtime/TypedArrayConstructor.cpp
index ec8fda8abc..7f4cdfc4e7 100644
--- a/Userland/Libraries/LibJS/Runtime/TypedArrayConstructor.cpp
+++ b/Userland/Libraries/LibJS/Runtime/TypedArrayConstructor.cpp
@@ -143,7 +143,7 @@ JS_DEFINE_NATIVE_FUNCTION(TypedArrayConstructor::of)
}
// 23.2.2.4 get %TypedArray% [ @@species ], https://tc39.es/ecma262/#sec-get-%typedarray%-@@species
-JS_DEFINE_NATIVE_GETTER(TypedArrayConstructor::symbol_species_getter)
+JS_DEFINE_NATIVE_FUNCTION(TypedArrayConstructor::symbol_species_getter)
{
return vm.this_value(global_object);
}
diff --git a/Userland/Libraries/LibJS/Runtime/TypedArrayConstructor.h b/Userland/Libraries/LibJS/Runtime/TypedArrayConstructor.h
index c113b255e1..40455fbbdc 100644
--- a/Userland/Libraries/LibJS/Runtime/TypedArrayConstructor.h
+++ b/Userland/Libraries/LibJS/Runtime/TypedArrayConstructor.h
@@ -27,7 +27,7 @@ private:
JS_DECLARE_NATIVE_FUNCTION(from);
JS_DECLARE_NATIVE_FUNCTION(of);
- JS_DECLARE_NATIVE_GETTER(symbol_species_getter);
+ JS_DECLARE_NATIVE_FUNCTION(symbol_species_getter);
};
}
diff --git a/Userland/Libraries/LibJS/Runtime/TypedArrayPrototype.cpp b/Userland/Libraries/LibJS/Runtime/TypedArrayPrototype.cpp
index 00403a7eb7..c052c0fb1f 100644
--- a/Userland/Libraries/LibJS/Runtime/TypedArrayPrototype.cpp
+++ b/Userland/Libraries/LibJS/Runtime/TypedArrayPrototype.cpp
@@ -188,7 +188,7 @@ static TypedArrayBase* typed_array_species_create(GlobalObject& global_object, T
}
// 23.2.3.18 get %TypedArray%.prototype.length, https://tc39.es/ecma262/#sec-get-%typedarray%.prototype.length
-JS_DEFINE_NATIVE_GETTER(TypedArrayPrototype::length_getter)
+JS_DEFINE_NATIVE_FUNCTION(TypedArrayPrototype::length_getter)
{
auto typed_array = typed_array_from_this(global_object);
if (!typed_array)
@@ -620,7 +620,7 @@ JS_DEFINE_NATIVE_FUNCTION(TypedArrayPrototype::entries)
}
// 23.2.3.1 get %TypedArray%.prototype.buffer, https://tc39.es/ecma262/#sec-get-%typedarray%.prototype.buffer
-JS_DEFINE_NATIVE_GETTER(TypedArrayPrototype::buffer_getter)
+JS_DEFINE_NATIVE_FUNCTION(TypedArrayPrototype::buffer_getter)
{
auto* typed_array = typed_array_from_this(global_object);
if (!typed_array)
@@ -631,7 +631,7 @@ JS_DEFINE_NATIVE_GETTER(TypedArrayPrototype::buffer_getter)
}
// 23.2.3.2 get %TypedArray%.prototype.byteLength, https://tc39.es/ecma262/#sec-get-%typedarray%.prototype.bytelength
-JS_DEFINE_NATIVE_GETTER(TypedArrayPrototype::byte_length_getter)
+JS_DEFINE_NATIVE_FUNCTION(TypedArrayPrototype::byte_length_getter)
{
auto* typed_array = typed_array_from_this(global_object);
if (!typed_array)
@@ -644,7 +644,7 @@ JS_DEFINE_NATIVE_GETTER(TypedArrayPrototype::byte_length_getter)
}
// 23.2.3.3 get %TypedArray%.prototype.byteOffset, https://tc39.es/ecma262/#sec-get-%typedarray%.prototype.byteoffset
-JS_DEFINE_NATIVE_GETTER(TypedArrayPrototype::byte_offset_getter)
+JS_DEFINE_NATIVE_FUNCTION(TypedArrayPrototype::byte_offset_getter)
{
auto* typed_array = typed_array_from_this(global_object);
if (!typed_array)
diff --git a/Userland/Libraries/LibJS/Runtime/TypedArrayPrototype.h b/Userland/Libraries/LibJS/Runtime/TypedArrayPrototype.h
index 2e24624676..245d146878 100644
--- a/Userland/Libraries/LibJS/Runtime/TypedArrayPrototype.h
+++ b/Userland/Libraries/LibJS/Runtime/TypedArrayPrototype.h
@@ -20,10 +20,10 @@ public:
virtual ~TypedArrayPrototype() override;
private:
- JS_DECLARE_NATIVE_GETTER(length_getter);
- JS_DECLARE_NATIVE_GETTER(buffer_getter);
- JS_DECLARE_NATIVE_GETTER(byte_length_getter);
- JS_DECLARE_NATIVE_GETTER(byte_offset_getter);
+ JS_DECLARE_NATIVE_FUNCTION(length_getter);
+ JS_DECLARE_NATIVE_FUNCTION(buffer_getter);
+ JS_DECLARE_NATIVE_FUNCTION(byte_length_getter);
+ JS_DECLARE_NATIVE_FUNCTION(byte_offset_getter);
JS_DECLARE_NATIVE_FUNCTION(to_string_tag_getter);
JS_DECLARE_NATIVE_FUNCTION(at);
JS_DECLARE_NATIVE_FUNCTION(every);
diff --git a/Userland/Libraries/LibWeb/Bindings/WindowObject.cpp b/Userland/Libraries/LibWeb/Bindings/WindowObject.cpp
index fe0e377f32..24b670ea1d 100644
--- a/Userland/Libraries/LibWeb/Bindings/WindowObject.cpp
+++ b/Userland/Libraries/LibWeb/Bindings/WindowObject.cpp
@@ -560,7 +560,7 @@ JS_DEFINE_NATIVE_FUNCTION(WindowObject::match_media)
}
// https://www.w3.org/TR/cssom-view/#dom-window-scrollx
-JS_DEFINE_NATIVE_GETTER(WindowObject::scroll_x_getter)
+JS_DEFINE_NATIVE_FUNCTION(WindowObject::scroll_x_getter)
{
auto* impl = impl_from(vm, global_object);
if (!impl)
@@ -569,7 +569,7 @@ JS_DEFINE_NATIVE_GETTER(WindowObject::scroll_x_getter)
}
// https://www.w3.org/TR/cssom-view/#dom-window-scrolly
-JS_DEFINE_NATIVE_GETTER(WindowObject::scroll_y_getter)
+JS_DEFINE_NATIVE_FUNCTION(WindowObject::scroll_y_getter)
{
auto* impl = impl_from(vm, global_object);
if (!impl)
@@ -704,7 +704,7 @@ JS_DEFINE_NATIVE_FUNCTION(WindowObject::history_getter)
return wrap(global_object, impl->associated_document().history());
}
-JS_DEFINE_NATIVE_GETTER(WindowObject::screen_left_getter)
+JS_DEFINE_NATIVE_FUNCTION(WindowObject::screen_left_getter)
{
auto* impl = impl_from(vm, global_object);
if (!impl)
@@ -712,7 +712,7 @@ JS_DEFINE_NATIVE_GETTER(WindowObject::screen_left_getter)
return JS::Value(impl->screen_x());
}
-JS_DEFINE_NATIVE_GETTER(WindowObject::screen_top_getter)
+JS_DEFINE_NATIVE_FUNCTION(WindowObject::screen_top_getter)
{
auto* impl = impl_from(vm, global_object);
if (!impl)
@@ -720,7 +720,7 @@ JS_DEFINE_NATIVE_GETTER(WindowObject::screen_top_getter)
return JS::Value(impl->screen_y());
}
-JS_DEFINE_NATIVE_GETTER(WindowObject::screen_x_getter)
+JS_DEFINE_NATIVE_FUNCTION(WindowObject::screen_x_getter)
{
auto* impl = impl_from(vm, global_object);
if (!impl)
@@ -728,7 +728,7 @@ JS_DEFINE_NATIVE_GETTER(WindowObject::screen_x_getter)
return JS::Value(impl->screen_x());
}
-JS_DEFINE_NATIVE_GETTER(WindowObject::screen_y_getter)
+JS_DEFINE_NATIVE_FUNCTION(WindowObject::screen_y_getter)
{
auto* impl = impl_from(vm, global_object);
if (!impl)
diff --git a/Userland/Libraries/LibWeb/Bindings/WindowObject.h b/Userland/Libraries/LibWeb/Bindings/WindowObject.h
index 82feef7c28..c86a89de5e 100644
--- a/Userland/Libraries/LibWeb/Bindings/WindowObject.h
+++ b/Userland/Libraries/LibWeb/Bindings/WindowObject.h
@@ -84,15 +84,15 @@ private:
JS_DECLARE_NATIVE_FUNCTION(device_pixel_ratio_getter);
- JS_DECLARE_NATIVE_GETTER(scroll_x_getter);
- JS_DECLARE_NATIVE_GETTER(scroll_y_getter);
+ JS_DECLARE_NATIVE_FUNCTION(scroll_x_getter);
+ JS_DECLARE_NATIVE_FUNCTION(scroll_y_getter);
JS_DECLARE_NATIVE_FUNCTION(scroll);
JS_DECLARE_NATIVE_FUNCTION(scroll_by);
- JS_DECLARE_NATIVE_GETTER(screen_x_getter);
- JS_DECLARE_NATIVE_GETTER(screen_y_getter);
- JS_DECLARE_NATIVE_GETTER(screen_left_getter);
- JS_DECLARE_NATIVE_GETTER(screen_top_getter);
+ JS_DECLARE_NATIVE_FUNCTION(screen_x_getter);
+ JS_DECLARE_NATIVE_FUNCTION(screen_y_getter);
+ JS_DECLARE_NATIVE_FUNCTION(screen_left_getter);
+ JS_DECLARE_NATIVE_FUNCTION(screen_top_getter);
JS_DECLARE_NATIVE_FUNCTION(alert);
JS_DECLARE_NATIVE_FUNCTION(confirm);
diff --git a/Userland/Services/WebContent/ConsoleGlobalObject.cpp b/Userland/Services/WebContent/ConsoleGlobalObject.cpp
index f583b4e3a4..69dede6e7c 100644
--- a/Userland/Services/WebContent/ConsoleGlobalObject.cpp
+++ b/Userland/Services/WebContent/ConsoleGlobalObject.cpp
@@ -98,7 +98,7 @@ JS::ThrowCompletionOr<JS::MarkedValueList> ConsoleGlobalObject::internal_own_pro
return m_window_object->internal_own_property_keys();
}
-JS_DEFINE_NATIVE_GETTER(ConsoleGlobalObject::inspected_node_getter)
+JS_DEFINE_NATIVE_FUNCTION(ConsoleGlobalObject::inspected_node_getter)
{
auto* this_object = TRY_OR_DISCARD(vm.this_value(global_object).to_object(global_object));
diff --git a/Userland/Services/WebContent/ConsoleGlobalObject.h b/Userland/Services/WebContent/ConsoleGlobalObject.h
index af648aa6e6..d3d5fa652f 100644
--- a/Userland/Services/WebContent/ConsoleGlobalObject.h
+++ b/Userland/Services/WebContent/ConsoleGlobalObject.h
@@ -41,7 +41,7 @@ private:
virtual void visit_edges(Visitor&) override;
// Because $0 is not a nice C++ function name
- JS_DECLARE_NATIVE_GETTER(inspected_node_getter);
+ JS_DECLARE_NATIVE_FUNCTION(inspected_node_getter);
Web::Bindings::WindowObject* m_window_object;
};