mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 05:37:34 +00:00
LibJS: Replace uses of MarkedValueList with MarkedVector<Value>
This is effectively a drop-in replacement.
This commit is contained in:
parent
1d32ac7b8b
commit
bc183dbbcb
61 changed files with 143 additions and 142 deletions
|
@ -64,7 +64,7 @@ JS_DEFINE_NATIVE_FUNCTION(Intl::get_canonical_locales)
|
|||
// 1. Let ll be ? CanonicalizeLocaleList(locales).
|
||||
auto locale_list = TRY(canonicalize_locale_list(global_object, locales));
|
||||
|
||||
MarkedValueList marked_locale_list { vm.heap() };
|
||||
MarkedVector<Value> marked_locale_list { vm.heap() };
|
||||
marked_locale_list.ensure_capacity(locale_list.size());
|
||||
for (auto& locale : locale_list)
|
||||
marked_locale_list.append(js_string(vm, move(locale)));
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibJS/Heap/MarkedVector.h>
|
||||
#include <LibJS/Runtime/Array.h>
|
||||
#include <LibJS/Runtime/GlobalObject.h>
|
||||
#include <LibJS/Runtime/Intl/PluralRulesPrototype.h>
|
||||
#include <LibJS/Runtime/MarkedValueList.h>
|
||||
|
||||
namespace JS::Intl {
|
||||
|
||||
|
@ -59,7 +59,7 @@ JS_DEFINE_NATIVE_FUNCTION(PluralRulesPrototype::resolved_options)
|
|||
|
||||
// 5. Let pluralCategories be a List of Strings containing all possible results of PluralRuleSelect for the selected locale pr.[[Locale]].
|
||||
// FIXME: Implement this when the data is available in LibUnicode.
|
||||
MarkedValueList plural_categories { vm.heap() };
|
||||
MarkedVector<Value> plural_categories { vm.heap() };
|
||||
|
||||
// 6. Perform ! CreateDataProperty(options, "pluralCategories", CreateArrayFromList(pluralCategories)).
|
||||
MUST(options->create_data_property_or_throw(vm.names.pluralCategories, Array::create_from(global_object, plural_categories)));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue