diff options
author | Linus Groh <mail@linusgroh.de> | 2022-12-06 22:17:27 +0000 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2022-12-07 16:43:06 +0000 |
commit | 525f22d018cb5f9c4c6ea0e2b5544fdcab8da483 (patch) | |
tree | 2488bac4fab4acec0d258c9bac2338bc95ee6398 /Userland/Libraries/LibWeb/URL | |
parent | 5db38d7ba1a8caa5138dd65cc06be0c0e5a568e4 (diff) | |
download | serenity-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/LibWeb/URL')
-rw-r--r-- | Userland/Libraries/LibWeb/URL/URLSearchParamsIterator.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Userland/Libraries/LibWeb/URL/URLSearchParamsIterator.cpp b/Userland/Libraries/LibWeb/URL/URLSearchParamsIterator.cpp index 9d1cb1a3da..f8cc777bfa 100644 --- a/Userland/Libraries/LibWeb/URL/URLSearchParamsIterator.cpp +++ b/Userland/Libraries/LibWeb/URL/URLSearchParamsIterator.cpp @@ -40,11 +40,11 @@ JS::Object* URLSearchParamsIterator::next() auto& entry = m_url_search_params.m_list[m_index++]; if (m_iteration_kind == JS::Object::PropertyKind::Key) - return create_iterator_result_object(vm(), JS::js_string(vm(), entry.name), false); + return create_iterator_result_object(vm(), JS::PrimitiveString::create(vm(), entry.name), false); else if (m_iteration_kind == JS::Object::PropertyKind::Value) - return create_iterator_result_object(vm(), JS::js_string(vm(), entry.value), false); + return create_iterator_result_object(vm(), JS::PrimitiveString::create(vm(), entry.value), false); - return create_iterator_result_object(vm(), JS::Array::create_from(realm(), { JS::js_string(vm(), entry.name), JS::js_string(vm(), entry.value) }), false); + return create_iterator_result_object(vm(), JS::Array::create_from(realm(), { JS::PrimitiveString::create(vm(), entry.name), JS::PrimitiveString::create(vm(), entry.value) }), false); } } |