mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-15 07:32:52 +00:00
LibJS: Replace boolean without_side_effects parameters with an enum
This commit is contained in:
parent
864beb0bd5
commit
dcb55db99b
Notes:
sideshowbarker
2024-07-18 12:07:43 +09:00
Author: https://github.com/IdanHo
Commit: dcb55db99b
Pull-request: https://github.com/SerenityOS/serenity/pull/8101
Reviewed-by: https://github.com/linusg
16 changed files with 56 additions and 51 deletions
|
@ -21,16 +21,16 @@ DebuggerGlobalJSObject::DebuggerGlobalJSObject()
|
|||
m_variables = lib->debug_info->get_variables_in_current_scope(regs);
|
||||
}
|
||||
|
||||
JS::Value DebuggerGlobalJSObject::get(const JS::PropertyName& name, JS::Value receiver, bool without_side_effects) const
|
||||
JS::Value DebuggerGlobalJSObject::get(const JS::PropertyName& name, JS::Value receiver, JS::AllowSideEffects allow_side_effects) const
|
||||
{
|
||||
if (m_variables.is_empty() || !name.is_string())
|
||||
return JS::Object::get(name, receiver, without_side_effects);
|
||||
return JS::Object::get(name, receiver, allow_side_effects);
|
||||
|
||||
auto it = m_variables.find_if([&](auto& variable) {
|
||||
return variable->name == name.as_string();
|
||||
});
|
||||
if (it.is_end())
|
||||
return JS::Object::get(name, receiver, without_side_effects);
|
||||
return JS::Object::get(name, receiver, allow_side_effects);
|
||||
auto& target_variable = **it;
|
||||
auto js_value = debugger_to_js(target_variable);
|
||||
if (js_value.has_value())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue