Closed Bug 1568175 Opened 6 years ago Closed 6 years ago

Simplify "availableLocales" functions by directly using CallArgs::rval

Categories

(Core :: JavaScript: Internationalization API, task)

task
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla70
Tracking Status
firefox70 --- fixed

People

(Reporter: anba, Assigned: anba)

Details

Attachments

(1 file)

From js::intl_Collator_availableLocales

RootedValue result(cx);
if (!GetAvailableLocales(cx, ucol_countAvailable, ucol_getAvailable, &result)) {
  return false;
}
args.rval().set(result);
return true;

can be simplified to:

return GetAvailableLocales(cx, ucol_countAvailable, ucol_getAvailable, args.rval());

The same pattern appears in all Intl classes.

Pushed by btara@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/9cca1ac4fe97
Directly store result of 'available-locales' function in args.rval(). r=khyperia

Keywords: checkin-needed
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla70
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: