1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-30 23:08:11 +00:00
serenity/Userland/Libraries/LibJS/Runtime/Intl
Timothy Flynn c3abb1396c LibJS+LibWeb: Convert string view PrimitiveString instances to String
First, this adds an overload of PrimitiveString::create for StringView.
This overload will throw an OOM completion if creating a String fails.
This is not only a bit more convenient, but it also ensures at compile
time that all PrimitiveString::create(string_view) invocations will be
handled as String and OOM-aware.

Next, this wraps all invocations to PrimitiveString::create(string_view)
with MUST_OR_THROW_OOM.

A small PrimitiveString::create(DeprecatedFlyString) overload also had
to be added to disambiguate between the StringView and DeprecatedString
overloads.
2023-02-09 17:13:33 +00:00
..
AbstractOperations.cpp Everywhere: Use ReadonlySpan<T> instead of Span<T const> 2023-02-08 19:15:45 +00:00
AbstractOperations.h Everywhere: Use ReadonlySpan<T> instead of Span<T const> 2023-02-08 19:15:45 +00:00
Collator.cpp LibJS: Remove Object(Object& prototype) footgun 2022-12-14 15:11:57 +01:00
Collator.h LibJS: Port Intl locale resolution to String 2023-01-19 20:57:30 +00:00
CollatorCompareFunction.cpp LibJS+Everywhere: Propagate Cell::initialize errors from Heap::allocate 2023-01-29 00:02:45 +00:00
CollatorCompareFunction.h LibJS+Everywhere: Allow Cell::initialize overrides to throw OOM errors 2023-01-29 00:02:45 +00:00
CollatorConstructor.cpp LibJS+LibWeb: Convert string view PrimitiveString instances to String 2023-02-09 17:13:33 +00:00
CollatorConstructor.h LibJS+Everywhere: Allow Cell::initialize overrides to throw OOM errors 2023-01-29 00:02:45 +00:00
CollatorPrototype.cpp LibJS+LibWeb: Convert string view PrimitiveString instances to String 2023-02-09 17:13:33 +00:00
CollatorPrototype.h LibJS+Everywhere: Allow Cell::initialize overrides to throw OOM errors 2023-01-29 00:02:45 +00:00
DateTimeFormat.cpp LibJS+LibWeb: Convert string view PrimitiveString instances to String 2023-02-09 17:13:33 +00:00
DateTimeFormat.h Everywhere: Use ReadonlySpan<T> instead of Span<T const> 2023-02-08 19:15:45 +00:00
DateTimeFormatConstructor.cpp LibJS+Everywhere: Allow Cell::initialize overrides to throw OOM errors 2023-01-29 00:02:45 +00:00
DateTimeFormatConstructor.h LibJS+Everywhere: Allow Cell::initialize overrides to throw OOM errors 2023-01-29 00:02:45 +00:00
DateTimeFormatFunction.cpp LibJS+Everywhere: Propagate Cell::initialize errors from Heap::allocate 2023-01-29 00:02:45 +00:00
DateTimeFormatFunction.h LibJS+Everywhere: Allow Cell::initialize overrides to throw OOM errors 2023-01-29 00:02:45 +00:00
DateTimeFormatPrototype.cpp LibJS+LibWeb: Convert string view PrimitiveString instances to String 2023-02-09 17:13:33 +00:00
DateTimeFormatPrototype.h LibJS+Everywhere: Allow Cell::initialize overrides to throw OOM errors 2023-01-29 00:02:45 +00:00
DisplayNames.cpp LibJS+LibWeb: Convert string view PrimitiveString instances to String 2023-02-09 17:13:33 +00:00
DisplayNames.h LibJS: Port Intl locale resolution to String 2023-01-19 20:57:30 +00:00
DisplayNamesConstructor.cpp LibJS+Everywhere: Allow Cell::initialize overrides to throw OOM errors 2023-01-29 00:02:45 +00:00
DisplayNamesConstructor.h LibJS+Everywhere: Allow Cell::initialize overrides to throw OOM errors 2023-01-29 00:02:45 +00:00
DisplayNamesPrototype.cpp LibJS+LibWeb: Convert string view PrimitiveString instances to String 2023-02-09 17:13:33 +00:00
DisplayNamesPrototype.h LibJS+Everywhere: Allow Cell::initialize overrides to throw OOM errors 2023-01-29 00:02:45 +00:00
DurationFormat.cpp LibJS+LibWeb: Convert string view PrimitiveString instances to String 2023-02-09 17:13:33 +00:00
DurationFormat.h Everywhere: Use ReadonlySpan<T> instead of Span<T const> 2023-02-08 19:15:45 +00:00
DurationFormatConstructor.cpp LibJS+Everywhere: Allow Cell::initialize overrides to throw OOM errors 2023-01-29 00:02:45 +00:00
DurationFormatConstructor.h LibJS+Everywhere: Allow Cell::initialize overrides to throw OOM errors 2023-01-29 00:02:45 +00:00
DurationFormatPrototype.cpp LibJS+LibWeb: Convert string view PrimitiveString instances to String 2023-02-09 17:13:33 +00:00
DurationFormatPrototype.h LibJS+Everywhere: Allow Cell::initialize overrides to throw OOM errors 2023-01-29 00:02:45 +00:00
Intl.cpp LibJS+LibWeb: Convert string view PrimitiveString instances to String 2023-02-09 17:13:33 +00:00
Intl.h LibJS+Everywhere: Allow Cell::initialize overrides to throw OOM errors 2023-01-29 00:02:45 +00:00
ListFormat.cpp LibJS+LibWeb: Convert string view PrimitiveString instances to String 2023-02-09 17:13:33 +00:00
ListFormat.h LibJS: Port ListFormat and PatternPartition to String 2023-01-22 01:03:13 +00:00
ListFormatConstructor.cpp LibJS+Everywhere: Allow Cell::initialize overrides to throw OOM errors 2023-01-29 00:02:45 +00:00
ListFormatConstructor.h LibJS+Everywhere: Allow Cell::initialize overrides to throw OOM errors 2023-01-29 00:02:45 +00:00
ListFormatPrototype.cpp LibJS+LibWeb: Convert string view PrimitiveString instances to String 2023-02-09 17:13:33 +00:00
ListFormatPrototype.h LibJS+Everywhere: Allow Cell::initialize overrides to throw OOM errors 2023-01-29 00:02:45 +00:00
Locale.cpp LibJS+Everywhere: Propagate Cell::initialize errors from Heap::allocate 2023-01-29 00:02:45 +00:00
Locale.h LibJS: Propagate OOM errors from all Intl.Locale *OfLocale AOs 2023-01-24 16:23:50 -05:00
LocaleConstructor.cpp Everywhere: Use ReadonlySpan<T> instead of Span<T const> 2023-02-08 19:15:45 +00:00
LocaleConstructor.h LibJS+Everywhere: Allow Cell::initialize overrides to throw OOM errors 2023-01-29 00:02:45 +00:00
LocalePrototype.cpp LibJS+LibWeb: Convert string view PrimitiveString instances to String 2023-02-09 17:13:33 +00:00
LocalePrototype.h LibJS+Everywhere: Allow Cell::initialize overrides to throw OOM errors 2023-01-29 00:02:45 +00:00
MathematicalValue.cpp LibJS: Remove last use of DeprecatedString from Intl.MathematicalValue 2023-01-28 00:13:59 +00:00
MathematicalValue.h LibJS+LibWeb: Move headers around to allow including Value from Cell 2023-01-29 00:02:45 +00:00
NumberFormat.cpp LibJS+LibWeb: Convert string view PrimitiveString instances to String 2023-02-09 17:13:33 +00:00
NumberFormat.h LibJS+LibWeb: Convert string view PrimitiveString instances to String 2023-02-09 17:13:33 +00:00
NumberFormatConstructor.cpp LibJS: Refactor the Intl.NumberFormat GetStringOrBooleanOption AO 2023-01-30 12:19:14 -05:00
NumberFormatConstructor.h LibJS+Everywhere: Allow Cell::initialize overrides to throw OOM errors 2023-01-29 00:02:45 +00:00
NumberFormatFunction.cpp LibJS+Everywhere: Propagate Cell::initialize errors from Heap::allocate 2023-01-29 00:02:45 +00:00
NumberFormatFunction.h LibJS+Everywhere: Allow Cell::initialize overrides to throw OOM errors 2023-01-29 00:02:45 +00:00
NumberFormatPrototype.cpp LibJS+LibWeb: Convert string view PrimitiveString instances to String 2023-02-09 17:13:33 +00:00
NumberFormatPrototype.h LibJS+Everywhere: Allow Cell::initialize overrides to throw OOM errors 2023-01-29 00:02:45 +00:00
PluralRules.cpp LibJS: Allow "approximately" results to differ in plural form 2023-01-30 14:10:07 -05:00
PluralRules.h LibJS: Allow "approximately" results to differ in plural form 2023-01-30 14:10:07 -05:00
PluralRulesConstructor.cpp LibJS: Move resolution of some Intl.NumberFormat options to a common AO 2023-01-30 12:19:14 -05:00
PluralRulesConstructor.h LibJS+Everywhere: Allow Cell::initialize overrides to throw OOM errors 2023-01-29 00:02:45 +00:00
PluralRulesPrototype.cpp LibJS+LibWeb: Convert string view PrimitiveString instances to String 2023-02-09 17:13:33 +00:00
PluralRulesPrototype.h LibJS+Everywhere: Allow Cell::initialize overrides to throw OOM errors 2023-01-29 00:02:45 +00:00
RelativeTimeFormat.cpp LibJS+LibWeb: Convert string view PrimitiveString instances to String 2023-02-09 17:13:33 +00:00
RelativeTimeFormat.h LibJS: Port Intl.RelativeTimeFormat to String 2023-01-28 00:13:59 +00:00
RelativeTimeFormatConstructor.cpp LibJS+Everywhere: Allow Cell::initialize overrides to throw OOM errors 2023-01-29 00:02:45 +00:00
RelativeTimeFormatConstructor.h LibJS+Everywhere: Allow Cell::initialize overrides to throw OOM errors 2023-01-29 00:02:45 +00:00
RelativeTimeFormatPrototype.cpp LibJS+LibWeb: Convert string view PrimitiveString instances to String 2023-02-09 17:13:33 +00:00
RelativeTimeFormatPrototype.h LibJS+Everywhere: Allow Cell::initialize overrides to throw OOM errors 2023-01-29 00:02:45 +00:00
Segmenter.cpp LibJS+Everywhere: Make PrimitiveString and Utf16String fallible 2023-01-08 12:13:15 +01:00
Segmenter.h LibJS: Port Intl locale resolution to String 2023-01-19 20:57:30 +00:00
SegmenterConstructor.cpp LibJS+Everywhere: Allow Cell::initialize overrides to throw OOM errors 2023-01-29 00:02:45 +00:00
SegmenterConstructor.h LibJS+Everywhere: Allow Cell::initialize overrides to throw OOM errors 2023-01-29 00:02:45 +00:00
SegmenterPrototype.cpp LibJS+LibWeb: Convert string view PrimitiveString instances to String 2023-02-09 17:13:33 +00:00
SegmenterPrototype.h LibJS+Everywhere: Allow Cell::initialize overrides to throw OOM errors 2023-01-29 00:02:45 +00:00
SegmentIterator.cpp LibJS+Everywhere: Propagate Cell::initialize errors from Heap::allocate 2023-01-29 00:02:45 +00:00
SegmentIterator.h LibJS: Convert Intl::SegmentIterator::create() to NonnullGCPtr 2022-12-14 09:59:45 +00:00
SegmentIteratorPrototype.cpp LibJS+LibWeb: Convert string view PrimitiveString instances to String 2023-02-09 17:13:33 +00:00
SegmentIteratorPrototype.h LibJS+Everywhere: Allow Cell::initialize overrides to throw OOM errors 2023-01-29 00:02:45 +00:00
Segments.cpp LibJS+Everywhere: Propagate Cell::initialize errors from Heap::allocate 2023-01-29 00:02:45 +00:00
Segments.h LibJS: Convert Intl::Segments::create() to NonnullGCPtr 2022-12-14 09:59:45 +00:00
SegmentsPrototype.cpp LibJS+Everywhere: Allow Cell::initialize overrides to throw OOM errors 2023-01-29 00:02:45 +00:00
SegmentsPrototype.h LibJS+Everywhere: Allow Cell::initialize overrides to throw OOM errors 2023-01-29 00:02:45 +00:00
SingleUnitIdentifiers.h LibJS+LibUnicode: Add "microsecond" and "nanosecond" as sanctioned units 2022-11-03 18:37:48 +00:00