mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-30 11:37:16 +02:00
LibJS: Correct the handling of accessors on strings
This commit is contained in:
Notes:
sideshowbarker
2024-07-19 18:29:57 +09:00
Committer: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/44a2ebea00a
@@ -65,10 +65,15 @@ ThrowCompletionOr<Value> Reference::get_value(GlobalObject& global_object) const
|
||||
if (is_property_reference()) {
|
||||
auto* base_obj = TRY(m_base_value.to_object(global_object));
|
||||
|
||||
if (is_private_reference())
|
||||
if (is_private_reference()) {
|
||||
// FIXME: We need to be able to specify the receiver for this
|
||||
// if we want to use it in error messages in future
|
||||
// as things currently stand this does the "wrong thing" but
|
||||
// the error is unobservable
|
||||
return base_obj->private_get(m_private_name);
|
||||
}
|
||||
|
||||
return base_obj->get(m_name);
|
||||
return base_obj->internal_get(m_name, m_base_value);
|
||||
}
|
||||
|
||||
VERIFY(m_base_type == BaseType::Environment);
|
||||
|
||||
Reference in New Issue
Block a user