Closed Bug 48284 Opened 25 years ago Closed 25 years ago

GetUnicodeEncoder returns cached instance

Categories

(Core :: Internationalization, defect, P3)

defect

Tracking

()

VERIFIED FIXED

People

(Reporter: nhottanscp, Assigned: nhottanscp)

References

Details

(Whiteboard: [nsbeta3+])

Attachments

(1 file)

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 }
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
Blocks: 46729
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.
Reassign to nhotta.
Assignee: dp → nhotta
Status: NEW → ASSIGNED
OS: Windows NT → All
Hardware: PC → All
nsbeta3+ to unblock trudelle's group (pavlov). nsbeta3+ per ftang/jaimejr r=ftang/cata . check it in.
Whiteboard: [nsbeta3+]
checked in the patch
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Verified.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: