Closed
Bug 48284
Opened 25 years ago
Closed 25 years ago
GetUnicodeEncoder returns cached instance
Categories
(Core :: Internationalization, defect, P3)
Core
Internationalization
Tracking
()
VERIFIED
FIXED
People
(Reporter: nhottanscp, Assigned: nhottanscp)
References
Details
(Whiteboard: [nsbeta3+])
Attachments
(1 file)
|
1.92 KB,
patch
|
Details | Diff | Splinter Review |
When I call GetUnicodeEncoder for ISO-8859-1, I am getting a cached encoder.
For example, mErrBehavior is set to kOnError_Replace that is a different from
the default value kOnError_Signal.
487 nsCOMPtr<nsIUnicodeEncoder> encoder;
488 if (!strncmp(progid+baselen, NS_1BYTE_CODER_PATTERN,
NS_1BYTE_CODER_PATTERN_LEN))
489 {
490 // Single byte encoders/decoders dont hold state. Optimize by using a
service.
491 encoder = do_GetService(progid, &res);
492 }
| Assignee | ||
Comment 1•25 years ago
|
||
Nominating for nsbeta3.
By getting a cached encoder, the encoder has states set by someone else.
In the example I mentioned, I cannot do a client side fallback for unmapped
characters (e.g. transliteration) because the converter internal fallback is
already set by someone else.
Keywords: nsbeta3
DP, you should back out the performance improvement for the encoders: looks like
the assumption that they are stateless is not true. Keep them for decoders
though, so far they look ok.
| Assignee | ||
Updated•25 years ago
|
Status: NEW → ASSIGNED
OS: Windows NT → All
Hardware: PC → All
| Assignee | ||
Comment 4•25 years ago
|
||
Comment 5•25 years ago
|
||
nsbeta3+ to unblock trudelle's group (pavlov). nsbeta3+ per ftang/jaimejr
r=ftang/cata . check it in.
Whiteboard: [nsbeta3+]
| Assignee | ||
Comment 6•25 years ago
|
||
checked in the patch
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•