mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-17 00:23:00 +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:
parent
3e6aaa3520
commit
6f20f49b21
Notes:
sideshowbarker
2024-07-17 19:41:36 +09:00
Author: https://github.com/linusg
Commit: 6f20f49b21
Pull-request: https://github.com/SerenityOS/serenity/pull/12314
Reviewed-by: https://github.com/davidot ✅
25 changed files with 435 additions and 435 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue