Closed
Bug 225106
Opened 21 years ago
Closed 21 years ago
remove redundant charset alias resolution in charset converter manager
Categories
(Core :: Internationalization, defect)
Core
Internationalization
Tracking
()
RESOLVED
FIXED
People
(Reporter: jshin1987, Assigned: jshin1987)
Details
(Keywords: intl)
Attachments
(1 file)
1.63 KB,
patch
|
smontagu
:
review+
bzbarsky
:
superreview+
|
Details | Diff | Splinter Review |
I just found that there's a redundant call to GetCharsetAlias in
GetCharsetLangGroupRaw in nsCharsetConverterManager. |GetCharsetLangGroup| calls
GetCharsetAlias before calling GetCharsetLangGroupRaw so that
GetCharsetLangGroupRaw shouldn't call it again.
Assignee | ||
Comment 1•21 years ago
|
||
Assignee | ||
Comment 2•21 years ago
|
||
Comment on attachment 135099 [details] [diff] [review]
patch
asking for r/sr.
this redundancy should have been caught when alecf changed the file, but
somehow it was missed.
Attachment #135099 -
Flags: superreview?(alecf)
Attachment #135099 -
Flags: review?(smontagu)
Comment 3•21 years ago
|
||
Comment on attachment 135099 [details] [diff] [review]
patch
r=smontagu
Attachment #135099 -
Flags: review?(smontagu) → review+
![]() |
||
Comment 4•21 years ago
|
||
Comment on attachment 135099 [details] [diff] [review]
patch
sr=bzbarsky
Attachment #135099 -
Flags: superreview?(alecf) → superreview+
Comment 5•21 years ago
|
||
Comment on attachment 135099 [details] [diff] [review]
patch
oh! nice. sr=alecf
but wait, this doesn't actually remove any redudnant code, except in case of
failure. is there a better way to structure this?
Assignee | ||
Comment 6•21 years ago
|
||
Thanks for quick r/sr. Fix checked into the trunk.
alecf, without the patch, there were _two_ calls to GetCharsetAlias() in most
cases. Most consumers call GetCharsetLangGroup which resolves charset alias and
then just passes the resolved charset to GetCharsetLangGroupRaw. Without the
patch, GetCharsetLangGroupRaw calls once again GetCharsetAlias (even though what
it receives is already resolved), which is a waste. Besides, a few consumers who
call GetCharsetLangGroupRaw (because they know what they have is already
resolved) wouldn't benefit from calling Raw version.
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•