diff options
author | Idan Horowitz <idan.horowitz@gmail.com> | 2021-06-17 03:12:41 +0300 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-06-17 16:52:15 +0200 |
commit | dcb55db99bcbf3855b0d7eadf79a0d9d356f4d2f (patch) | |
tree | 11e4b969d9081c2ca7654c23fb0743b7361aade7 /Userland/DevTools/HackStudio | |
parent | 864beb0bd502c16544aae77c9b508c8bad69d002 (diff) | |
download | serenity-dcb55db99bcbf3855b0d7eadf79a0d9d356f4d2f.zip |
LibJS: Replace boolean without_side_effects parameters with an enum
Diffstat (limited to 'Userland/DevTools/HackStudio')
-rw-r--r-- | Userland/DevTools/HackStudio/Debugger/DebuggerGlobalJSObject.cpp | 6 | ||||
-rw-r--r-- | Userland/DevTools/HackStudio/Debugger/DebuggerGlobalJSObject.h | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/Userland/DevTools/HackStudio/Debugger/DebuggerGlobalJSObject.cpp b/Userland/DevTools/HackStudio/Debugger/DebuggerGlobalJSObject.cpp index 5b1ba7e1b4..965c1d4e69 100644 --- a/Userland/DevTools/HackStudio/Debugger/DebuggerGlobalJSObject.cpp +++ b/Userland/DevTools/HackStudio/Debugger/DebuggerGlobalJSObject.cpp @@ -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()) diff --git a/Userland/DevTools/HackStudio/Debugger/DebuggerGlobalJSObject.h b/Userland/DevTools/HackStudio/Debugger/DebuggerGlobalJSObject.h index 5c551d5091..df958b8ba6 100644 --- a/Userland/DevTools/HackStudio/Debugger/DebuggerGlobalJSObject.h +++ b/Userland/DevTools/HackStudio/Debugger/DebuggerGlobalJSObject.h @@ -20,7 +20,7 @@ class DebuggerGlobalJSObject final public: DebuggerGlobalJSObject(); - JS::Value get(const JS::PropertyName& name, JS::Value receiver, bool without_side_effects) const override; + JS::Value get(const JS::PropertyName& name, JS::Value receiver, JS::AllowSideEffects = JS::AllowSideEffects::Yes) const override; bool put(const JS::PropertyName& name, JS::Value value, JS::Value receiver) override; Optional<JS::Value> debugger_to_js(const Debug::DebugInfo::VariableInfo&) const; |