Closed Bug 1730508 Opened 3 years ago Closed 3 years ago

Ensure errors pack nicely in a Result

Categories

(Core :: Internationalization, task, P3)

task

Tracking

()

RESOLVED FIXED
94 Branch
Tracking Status
firefox94 --- fixed

People

(Reporter: anba, Assigned: anba)

References

Details

(Whiteboard: [i18n-unification])

Attachments

(3 files, 4 obsolete files)

+++ This bug was initially created as a clone of Bug #1713206 +++

We should try and ensure that we don't need to use the ResultVariant.h file.

per anba:

Packed-variant selection happens here.

class DateTimeFormat final {
  // ...

  // Start error values at 1 to allow using the UnusedZero Result optimization.
  enum class StyleError { DateFormatFailure = 1 };

  // ...
};

namespace mozilla::detail {
template <>
struct UnusedZero<DateTimeFormat::StyleError> : UnusedZeroEnum<DateTimeFormat::StyleError> {};
}

This is the last remaining custom error type.

Depends on D125405

Fully propagate ICUError instead of using InternalError.

Depends on D125407

Attachment #9240910 - Attachment is obsolete: true
Attachment #9240911 - Attachment is obsolete: true
Attachment #9240912 - Attachment is obsolete: true
Attachment #9240913 - Attachment is obsolete: true
Attachment #9240914 - Attachment description: Bug 1730508 - Part 5: Propagate ICUError where possible. r=#platform-i18n-reviewers! → Bug 1730508 - Part 1: Propagate ICUError where possible. r=#platform-i18n-reviewers!
Attachment #9240915 - Attachment description: Bug 1730508 - Part 6: Remove unused function NullTerminatedMapper. r=#platform-i18n-reviewers! → Bug 1730508 - Part 2: Remove unused function NullTerminatedMapper. r=#platform-i18n-reviewers!
Attachment #9240916 - Attachment description: Bug 1730508 - Part 7: Enable UnusedZero and HasFreeLSB Result optimisations. r=#platform-i18n-reviewers! → Bug 1730508 - Part 3: Enable UnusedZero and HasFreeLSB Result optimisations. r=#platform-i18n-reviewers!
Pushed by andre.bargull@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/c18cccd75044
Part 1: Propagate ICUError where possible. r=platform-i18n-reviewers,gregtatum
https://hg.mozilla.org/integration/autoland/rev/5e29b556a538
Part 2: Remove unused function NullTerminatedMapper. r=platform-i18n-reviewers,gregtatum
https://hg.mozilla.org/integration/autoland/rev/ab456047a380
Part 3: Enable UnusedZero and HasFreeLSB Result optimisations. r=platform-i18n-reviewers,gregtatum,dminor
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: