1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 07:47:35 +00:00

LibJS: Implement SetDefaultGlobalBindings as a standalone function

Instead of hardcoding all the property definitions in GlobalObject's
initialize() function, make it the standalone AO it is supposed to be
that can then be used by other global objects that don't inherit from
JS::GlobalObject.
This commit is contained in:
Linus Groh 2022-08-28 17:33:01 +01:00
parent e3804e6426
commit 040e3abb1d
3 changed files with 103 additions and 81 deletions

View file

@ -40,6 +40,8 @@ private:
JS_DECLARE_NATIVE_FUNCTION(unescape);
};
Object& set_default_global_bindings(Realm&);
template<>
inline bool Object::fast_is<GlobalObject>() const { return is_global_object(); }