summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibJS/Runtime/Array.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Libraries/LibJS/Runtime/Array.cpp')
-rw-r--r--Userland/Libraries/LibJS/Runtime/Array.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/Array.cpp b/Userland/Libraries/LibJS/Runtime/Array.cpp
index 8d73220398..5b7b7011b2 100644
--- a/Userland/Libraries/LibJS/Runtime/Array.cpp
+++ b/Userland/Libraries/LibJS/Runtime/Array.cpp
@@ -186,10 +186,10 @@ ThrowCompletionOr<double> compare_array_elements(VM& vm, Value x, Value y, Funct
}
// 5. Let xString be ? ToString(x).
- auto* x_string = js_string(vm, TRY(x.to_string(vm)));
+ auto x_string = PrimitiveString::create(vm, TRY(x.to_string(vm)));
// 6. Let yString be ? ToString(y).
- auto* y_string = js_string(vm, TRY(y.to_string(vm)));
+ auto y_string = PrimitiveString::create(vm, TRY(y.to_string(vm)));
// 7. Let xSmaller be ! IsLessThan(xString, yString, true).
auto x_smaller = MUST(is_less_than(vm, x_string, y_string, true));
@@ -330,7 +330,7 @@ ThrowCompletionOr<MarkedVector<Value>> Array::internal_own_property_keys() const
auto& vm = this->vm();
auto keys = TRY(Object::internal_own_property_keys());
// FIXME: This is pretty expensive, find a better way to do this
- keys.insert(indexed_properties().real_size(), js_string(vm, vm.names.length.as_string()));
+ keys.insert(indexed_properties().real_size(), PrimitiveString::create(vm, vm.names.length.as_string()));
return { move(keys) };
}