Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#4156 closed enhancement (fixed)

Use nsIPrefLocalizedString in torbutton_get_general_useragent_locale()

Reported by: lunar Owned by: mikeperry
Priority: Low Milestone:
Component: Applications/Torbutton Version: Torbutton: 1.4.0
Severity: Keywords:
Cc: lunar@… Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

Initial fix for #1911 was manually doing the job done by nsIPrefLocalizedString, as documented on https://developer.mozilla.org/en/Code_snippets/Preferences#nsIPrefLocalizedString

This bit of code can be simplified.

Child Tickets

Attachments (2)

0001-Properly-use-nsIPrefLocalizedString-in-torbutton_get.patch (1.5 KB) - added by lunar 9 years ago.
v0
0001-Use-nsIPrefLocalizedString-only-when-required-in-tor.patch (1.4 KB) - added by lunar 9 years ago.
Fix for the previous patch

Download all attachments as: .zip

Change History (9)

comment:1 Changed 9 years ago by lunar

Status: newneeds_review

comment:2 Changed 9 years ago by mikeperry

Resolution: fixed
Status: needs_reviewclosed

Merged, thanks!

Will appear in 1.4.4 (along with your other patches).

comment:3 Changed 9 years ago by mikeperry

Keywords: MikePerryIterationFires20111009 added
Resolution: fixed
Status: closedreopened

Bleh. Turns out this doesn't work. It throws an NS_ERROR_UNEXPECTED exception in TBB.

Not sure why, because your patch for #3686 works fine and does not seem to throw an exception.

Do you think you could fix this? Or should I just revert?

Changed 9 years ago by lunar

Fix for the previous patch

comment:4 Changed 9 years ago by lunar

This is very very strange. Let's check if the pref contains a localizd string as before. The code is still nicer than it was, though.

comment:5 Changed 9 years ago by lunar

Status: reopenedneeds_review

comment:6 Changed 9 years ago by mikeperry

Resolution: fixed
Status: needs_reviewclosed

Ok, this seems to stop the exceptions. Merged.

comment:7 Changed 9 years ago by mikeperry

Keywords: MikePerryIterationFires20111009 removed
Note: See TracTickets for help on using tickets.