diff --git a/Libraries/LibJS/AST.cpp b/Libraries/LibJS/AST.cpp index df1a3be351..0313c0aa57 100644 --- a/Libraries/LibJS/AST.cpp +++ b/Libraries/LibJS/AST.cpp @@ -1285,7 +1285,7 @@ Value AssignmentExpression::execute(Interpreter& interpreter, GlobalObject& glob interpreter.vm().throw_exception(global_object, ErrorType::InvalidLeftHandAssignment); return {}; } - update_function_name(rhs_result, get_function_name(global_object, reference.name().to_value(interpreter))); + update_function_name(rhs_result, get_function_name(global_object, reference.name().to_value(interpreter.vm()))); reference.put(interpreter, global_object, rhs_result); if (interpreter.exception()) diff --git a/Libraries/LibJS/Runtime/Object.cpp b/Libraries/LibJS/Runtime/Object.cpp index 0e1f02babd..c6ad4dbc04 100644 --- a/Libraries/LibJS/Runtime/Object.cpp +++ b/Libraries/LibJS/Runtime/Object.cpp @@ -237,12 +237,12 @@ Value Object::get_own_properties(const Object& this_object, PropertyKind kind, b continue; if (kind == PropertyKind::Key) { - properties_array->define_property(property_index, it.key.to_value(interpreter())); + properties_array->define_property(property_index, it.key.to_value(vm())); } else if (kind == PropertyKind::Value) { properties_array->define_property(property_index, this_object.get(it.key)); } else { auto* entry_array = Array::create(global_object()); - entry_array->define_property(0, it.key.to_value(interpreter())); + entry_array->define_property(0, it.key.to_value(vm())); entry_array->define_property(1, this_object.get(it.key)); properties_array->define_property(property_index, entry_array); } diff --git a/Libraries/LibJS/Runtime/PropertyName.h b/Libraries/LibJS/Runtime/PropertyName.h index 76c25eb9d0..4c74c9de9f 100644 --- a/Libraries/LibJS/Runtime/PropertyName.h +++ b/Libraries/LibJS/Runtime/PropertyName.h @@ -136,10 +136,10 @@ public: return StringOrSymbol(as_symbol()); } - Value to_value(Interpreter& interpreter) const + Value to_value(VM& vm) const { if (is_string()) - return js_string(interpreter, m_string); + return js_string(vm, m_string); if (is_number()) return Value(m_number); if (is_symbol()) diff --git a/Libraries/LibJS/Runtime/ProxyObject.cpp b/Libraries/LibJS/Runtime/ProxyObject.cpp index 1654ad4005..fa25099e35 100644 --- a/Libraries/LibJS/Runtime/ProxyObject.cpp +++ b/Libraries/LibJS/Runtime/ProxyObject.cpp @@ -279,7 +279,7 @@ bool ProxyObject::define_property(const StringOrSymbol& property_name, const Obj return false; } - auto trap_result = vm().call(trap.as_function(), Value(&m_handler), Value(&m_target), property_name.to_value(interpreter()), Value(const_cast(&descriptor))).to_boolean(); + auto trap_result = vm().call(trap.as_function(), Value(&m_handler), Value(&m_target), property_name.to_value(vm()), Value(const_cast(&descriptor))).to_boolean(); if (vm().exception() || !trap_result) return false; auto target_desc = m_target.get_own_property_descriptor(property_name); diff --git a/Libraries/LibJS/Runtime/StringOrSymbol.h b/Libraries/LibJS/Runtime/StringOrSymbol.h index 3027aca0cd..ea66d2fcd0 100644 --- a/Libraries/LibJS/Runtime/StringOrSymbol.h +++ b/Libraries/LibJS/Runtime/StringOrSymbol.h @@ -99,10 +99,10 @@ public: ASSERT_NOT_REACHED(); } - Value to_value(Interpreter& interpreter) const + Value to_value(VM& vm) const { if (is_string()) - return js_string(interpreter, as_string()); + return js_string(vm, as_string()); if (is_symbol()) return const_cast(as_symbol()); return {};