Closed Bug 1716790 Opened 3 years ago Closed 3 years ago

Handle OOM in intl_canonicalizeTimeZone

Categories

(Core :: JavaScript: Internationalization API, defect)

defect

Tracking

()

RESOLVED FIXED
91 Branch
Tracking Status
firefox91 --- fixed

People

(Reporter: anba, Assigned: anba)

Details

Attachments

(5 files)

Handle OOM in intl_canonicalizeTimeZone and perform some style clean-ups.

FormatBuffer::toString() returns nullptr on OOM.

Delete some extra blank lines in error-handling code to align the code with the
rest of the code base.

Depends on D118019

It's not necessary to explicitly cast to void*.

Depends on D118020

These occurences of const in parameters were missed when const was removed
in the previous "Unified Intl" patches.

Depends on D118021

Place JSContext* as the last argument to indicate this function is infallible.

Most functions which have JSContext* as their first argument are fallible, so
a SpiderMonkey convention is to move JSContext* as the last parameter for
infallible functions.

Depends on D118022

Pushed by andre.bargull@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/c30ff4af578c
Part 1: Handle OOM error in intl_canonicalizeTimeZone. r=dminor
https://hg.mozilla.org/integration/autoland/rev/0366857d15b3
Part 2: Remove extra blank lines. r=dminor
https://hg.mozilla.org/integration/autoland/rev/c49f99d34cae
Part 3: Remove unnecessary explicit cast. r=dminor
https://hg.mozilla.org/integration/autoland/rev/fa73c034ae5d
Part 4: Remove unnecessary 'const' modifier. r=dminor
https://hg.mozilla.org/integration/autoland/rev/0bd5153b7662
Part 5: Switch parameter order in KeywordToString. r=dminor
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: