Closed Bug 1504168 Opened 7 years ago Closed 5 years ago

mozIntl seems to create a new class whenever requesting an Intl constructor

Categories

(Core :: Internationalization, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla78
Tracking Status
firefox65 --- wontfix
firefox78 --- fixed

People

(Reporter: anba, Assigned: zbraniecki)

Details

Attachments

(1 file)

Unless things get cached somehow, this [1] will create a completely new JS class whenever the 'NumberFormat' getter is executed. That means for example |mozIntl.NumberFormat === mozIntl.NumberFormat| is |false|. [1] https://searchfox.org/mozilla-central/rev/39cb1e96cf97713c444c5a0404d4f84627aee85d/toolkit/components/mozintl/mozIntl.js#330-337
Flags: needinfo?(gandalf)
Assignee: nobody → gandalf
Status: NEW → ASSIGNED
Flags: needinfo?(gandalf)
Pushed by zbraniecki@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/36964a9cbf7f Stop creating a new instance of a class for each call to mozIntl constructor. r=anba
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla78
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: