mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-25 09:00:22 +00:00
LibJS: Return void from SetDefaultGlobalBindings
Aligning with spec change: https://github.com/tc39/ecma262/commit/052def
This commit is contained in:
parent
0a1c9e4038
commit
b5536db915
Notes:
github-actions[bot]
2024-11-03 12:50:21 +00:00
Author: https://github.com/shannonbooth Commit: https://github.com/LadybirdBrowser/ladybird/commit/b5536db9156 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2116 Reviewed-by: https://github.com/trflynn89
2 changed files with 4 additions and 5 deletions
|
@ -95,8 +95,8 @@ GlobalObject::GlobalObject(Realm& realm)
|
|||
Object::set_prototype(realm.intrinsics().object_prototype());
|
||||
}
|
||||
|
||||
// 9.3.4 SetDefaultGlobalBindings ( realmRec ), https://tc39.es/ecma262/#sec-setdefaultglobalbindings
|
||||
Object& set_default_global_bindings(Realm& realm)
|
||||
// 9.3.3 SetDefaultGlobalBindings ( realmRec ), https://tc39.es/ecma262/#sec-setdefaultglobalbindings
|
||||
void set_default_global_bindings(Realm& realm)
|
||||
{
|
||||
auto& vm = realm.vm();
|
||||
|
||||
|
@ -191,8 +191,7 @@ Object& set_default_global_bindings(Realm& realm)
|
|||
global.define_direct_property(vm.names.InternalError, realm.intrinsics().internal_error_constructor(), attr);
|
||||
global.define_direct_property(vm.names.console, realm.intrinsics().console_object(), attr);
|
||||
|
||||
// 3. Return global.
|
||||
return global;
|
||||
// 3. Return unused.
|
||||
}
|
||||
|
||||
void GlobalObject::initialize(Realm& realm)
|
||||
|
|
|
@ -43,7 +43,7 @@ private:
|
|||
JS_DECLARE_NATIVE_FUNCTION(unescape);
|
||||
};
|
||||
|
||||
Object& set_default_global_bindings(Realm&);
|
||||
void set_default_global_bindings(Realm&);
|
||||
|
||||
template<>
|
||||
inline bool Object::fast_is<GlobalObject>() const { return is_global_object(); }
|
||||
|
|
Loading…
Reference in a new issue