summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibJS/Runtime/Intl/RelativeTimeFormat.cpp
diff options
context:
space:
mode:
authorLinus Groh <mail@linusgroh.de>2022-12-06 22:17:27 +0000
committerLinus Groh <mail@linusgroh.de>2022-12-07 16:43:06 +0000
commit525f22d018cb5f9c4c6ea0e2b5544fdcab8da483 (patch)
tree2488bac4fab4acec0d258c9bac2338bc95ee6398 /Userland/Libraries/LibJS/Runtime/Intl/RelativeTimeFormat.cpp
parent5db38d7ba1a8caa5138dd65cc06be0c0e5a568e4 (diff)
downloadserenity-525f22d018cb5f9c4c6ea0e2b5544fdcab8da483.zip
LibJS: Replace standalone js_string() with PrimitiveString::create()
Note that js_rope_string() has been folded into this, the old name was misleading - it would not always create a rope string, only if both sides are not empty strings. Use a three-argument create() overload instead.
Diffstat (limited to 'Userland/Libraries/LibJS/Runtime/Intl/RelativeTimeFormat.cpp')
-rw-r--r--Userland/Libraries/LibJS/Runtime/Intl/RelativeTimeFormat.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/Intl/RelativeTimeFormat.cpp b/Userland/Libraries/LibJS/Runtime/Intl/RelativeTimeFormat.cpp
index 248782ebde..3b34526877 100644
--- a/Userland/Libraries/LibJS/Runtime/Intl/RelativeTimeFormat.cpp
+++ b/Userland/Libraries/LibJS/Runtime/Intl/RelativeTimeFormat.cpp
@@ -260,15 +260,15 @@ ThrowCompletionOr<Array*> format_relative_time_to_parts(VM& vm, RelativeTimeForm
auto* object = Object::create(realm, realm.intrinsics().object_prototype());
// b. Perform ! CreateDataPropertyOrThrow(O, "type", part.[[Type]]).
- MUST(object->create_data_property_or_throw(vm.names.type, js_string(vm, part.type)));
+ MUST(object->create_data_property_or_throw(vm.names.type, PrimitiveString::create(vm, part.type)));
// c. Perform ! CreateDataPropertyOrThrow(O, "value", part.[[Value]]).
- MUST(object->create_data_property_or_throw(vm.names.value, js_string(vm, move(part.value))));
+ MUST(object->create_data_property_or_throw(vm.names.value, PrimitiveString::create(vm, move(part.value))));
// d. If part.[[Unit]] is not empty, then
if (!part.unit.is_empty()) {
// i. Perform ! CreateDataPropertyOrThrow(O, "unit", part.[[Unit]]).
- MUST(object->create_data_property_or_throw(vm.names.unit, js_string(vm, part.unit)));
+ MUST(object->create_data_property_or_throw(vm.names.unit, PrimitiveString::create(vm, part.unit)));
}
// e. Perform ! CreateDataPropertyOrThrow(result, ! ToString(n), O).