Closed Bug 813834 Opened 12 years ago Closed 12 years ago

Toolbar of Facebook Message is character corruption when using Japanese facebook messenger

Categories

(Firefox Graveyard :: SocialAPI, defect)

defect
Not set
normal

Tracking

(firefox18 verified, firefox19 verified, firefox20 verified)

VERIFIED FIXED
Firefox 20
Tracking Status
firefox18 --- verified
firefox19 --- verified
firefox20 --- verified

People

(Reporter: m_kato, Assigned: m_kato)

References

Details

Attachments

(1 file, 1 obsolete file)

toolbar data is stored into prefs.js (social.cached.notificationIcons).  

getCharPref and setCharPref is "string", not "wstring".  So we need Text(Encoder|Decoder) or nsIScriptableUnicodeConverter.

Current code use JSON parser directly, so social.cached.notificationIcons will corrupt if using non-ASCII.
Assignee: nobody → m_kato
Attached patch v1 (obsolete) — Splinter Review
Attachment #684345 - Flags: review?(jaws)
Seems like it would be easier to switch to an nsISupportsString complex pref, and just invalidate the cache once (e.g. by switching the pref name)?
(thanks for filing this - good catch!)
Comment on attachment 684345 [details] [diff] [review]
v1

Thanks for filing and writing the patch. Can you redo this patch using the setComplexPref/getComplexPref approach? https://developer.mozilla.org/en-US/docs/XPCOM_Interface_Reference/nsIPrefBranch#setComplexValue%28%29

We'll also want to change the pref name as Gavin suggested.
Attachment #684345 - Flags: review?(jaws)
Attached patch fix v2Splinter Review
get/setComplexValue instead of
Attachment #684345 - Attachment is obsolete: true
Attachment #686019 - Flags: review?(jaws)
Comment on attachment 686019 [details] [diff] [review]
fix v2

Review of attachment 686019 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks! Looks good to me.
Attachment #686019 - Flags: review?(jaws) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/089e5412a83b
Flags: in-testsuite+
Target Milestone: --- → Firefox 20
https://hg.mozilla.org/mozilla-central/rev/089e5412a83b
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Comment on attachment 686019 [details] [diff] [review]
fix v2

[Approval Request Comment]
Bug caused by (feature/regressing bug #): none.
User impact if declined: Tooltip of Facebook toolbar is still corrupted if using Facebook non-US version.  Facebook (and another partner for Social API) cannot localize tooltip/label of toolbar.
Testing completed (on m-c, etc.): landed.  Also this has test.
Risk to taking this patch (and alternatives if risky): too low.  This fix stores correct cache into prefs.js.
String or UUID changes made by this patch: no
Attachment #686019 - Flags: approval-mozilla-beta?
Attachment #686019 - Flags: approval-mozilla-aurora?
I agree that we should take this on Aurora/Beta.
Summary: Toolbar of Facebook Message is character corruption when using Japanese facebook messanger → Toolbar of Facebook Message is character corruption when using Japanese facebook messenger
Attachment #686019 - Flags: approval-mozilla-beta?
Attachment #686019 - Flags: approval-mozilla-beta+
Attachment #686019 - Flags: approval-mozilla-aurora?
Attachment #686019 - Flags: approval-mozilla-aurora+
Marking verified fixed since this landed with tests. Please add verifyme keyword if there's something you need QA to test.
Product: Firefox → Firefox Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: