mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-26 11:20:03 +00:00
Everywhere: Rename JS::PropertyKey variables from property_{name => key}
PropertyKey used to be called PropertyName, but got renamed. Let's update all the variables of this type as well.
This commit is contained in:
@@ -29,20 +29,20 @@ DebuggerVariableJSObject::~DebuggerVariableJSObject()
|
||||
{
|
||||
}
|
||||
|
||||
JS::ThrowCompletionOr<bool> DebuggerVariableJSObject::internal_set(const JS::PropertyKey& property_name, JS::Value value, JS::Value)
|
||||
JS::ThrowCompletionOr<bool> DebuggerVariableJSObject::internal_set(const JS::PropertyKey& property_key, JS::Value value, JS::Value)
|
||||
{
|
||||
auto& vm = this->vm();
|
||||
|
||||
if (!property_name.is_string())
|
||||
return vm.throw_completion<JS::TypeError>(global_object(), String::formatted("Invalid variable name {}", property_name.to_string()));
|
||||
if (!property_key.is_string())
|
||||
return vm.throw_completion<JS::TypeError>(global_object(), String::formatted("Invalid variable name {}", property_key.to_string()));
|
||||
|
||||
auto name = property_name.as_string();
|
||||
auto name = property_key.as_string();
|
||||
auto it = m_variable_info.members.find_if([&](auto& variable) {
|
||||
return variable->name == name;
|
||||
});
|
||||
|
||||
if (it.is_end())
|
||||
return vm.throw_completion<JS::TypeError>(global_object(), String::formatted("Variable of type {} has no property {}", m_variable_info.type_name, property_name));
|
||||
return vm.throw_completion<JS::TypeError>(global_object(), String::formatted("Variable of type {} has no property {}", m_variable_info.type_name, property_key));
|
||||
|
||||
auto& member = **it;
|
||||
auto new_value = debugger_object().js_to_debugger(value, member);
|
||||
|
||||
Reference in New Issue
Block a user