summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibJS
diff options
context:
space:
mode:
authorLinus Groh <mail@linusgroh.de>2022-05-05 20:43:51 +0200
committerLinus Groh <mail@linusgroh.de>2022-05-05 22:40:57 +0200
commit2c68ec90974918a6eb3c2e9a6d3169bd3c840f47 (patch)
tree828435458183df5d9e21fcf10d9d213ca4b38353 /Userland/Libraries/LibJS
parentf3f19f83217e4c5b5e0e93e533e6116577cca7e2 (diff)
downloadserenity-2c68ec90974918a6eb3c2e9a6d3169bd3c840f47.zip
LibJS: Use Object* for 'manual' GlobalObject::foo_prototype() getters
Not doing so only leads to problems down the line, e.g. not being able to pass them as function pointers to ordinary_create_from_constructor().
Diffstat (limited to 'Userland/Libraries/LibJS')
-rw-r--r--Userland/Libraries/LibJS/Runtime/GlobalObject.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/GlobalObject.h b/Userland/Libraries/LibJS/Runtime/GlobalObject.h
index 8b5b82d76c..651c0300c8 100644
--- a/Userland/Libraries/LibJS/Runtime/GlobalObject.h
+++ b/Userland/Libraries/LibJS/Runtime/GlobalObject.h
@@ -1,5 +1,6 @@
/*
* Copyright (c) 2020, Andreas Kling <kling@serenityos.org>
+ * Copyright (c) 2020-2022, Linus Groh <linusg@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@@ -35,11 +36,11 @@ public:
ProxyConstructor* proxy_constructor() { return m_proxy_constructor; }
// Not included in JS_ENUMERATE_NATIVE_OBJECTS due to missing distinct constructor
- GeneratorPrototype* generator_prototype() { return m_generator_prototype; }
- AsyncFromSyncIteratorPrototype* async_from_sync_iterator_prototype() { return m_async_from_sync_iterator_prototype; }
+ Object* async_from_sync_iterator_prototype() { return m_async_from_sync_iterator_prototype; }
+ Object* generator_prototype() { return m_generator_prototype; }
// Not included in JS_ENUMERATE_INTL_OBJECTS due to missing distinct constructor
- Intl::SegmentsPrototype* intl_segments_prototype() { return m_intl_segments_prototype; }
+ Object* intl_segments_prototype() { return m_intl_segments_prototype; }
FunctionObject* array_prototype_values_function() const { return m_array_prototype_values_function; }
FunctionObject* date_constructor_now_function() const { return m_date_constructor_now_function; }
@@ -107,11 +108,11 @@ private:
ProxyConstructor* m_proxy_constructor { nullptr };
// Not included in JS_ENUMERATE_NATIVE_OBJECTS due to missing distinct constructor
- GeneratorPrototype* m_generator_prototype { nullptr };
- AsyncFromSyncIteratorPrototype* m_async_from_sync_iterator_prototype { nullptr };
+ Object* m_async_from_sync_iterator_prototype { nullptr };
+ Object* m_generator_prototype { nullptr };
// Not included in JS_ENUMERATE_INTL_OBJECTS due to missing distinct constructor
- Intl::SegmentsPrototype* m_intl_segments_prototype { nullptr };
+ Object* m_intl_segments_prototype { nullptr };
FunctionObject* m_array_prototype_values_function { nullptr };
FunctionObject* m_date_constructor_now_function { nullptr };