Closed Bug 1428401 Opened 8 years ago Closed 8 years ago

Remove obsolete getPref helpers

Categories

(Toolkit :: General, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla59
Tracking Status
firefox59 --- fixed

People

(Reporter: florian, Assigned: florian)

References

Details

Attachments

(1 file)

We have a few duplicated 'getPref' helpers in the tree that are just wrapping nsIPrefBranch.get*Pref calls with a try/catch to return a default value instead of throwing. This is now supported by default since bug 1338306. https://searchfox.org/mozilla-central/search?q=getPref(%22get
Attached patch PatchSplinter Review
For a change, I haven't created a script to do this for me. It's just a simple search & replace in Emacs with this rule: getPref("\([^"]+\)",Services.prefs.\1( And then the indent is fixed by hand, and the functions removed by hand.
Attachment #8940280 - Flags: review?(gijskruitbosch+bugs)
Assignee: nobody → florian
Status: NEW → ASSIGNED
Comment on attachment 8940280 [details] [diff] [review] Patch Review of attachment 8940280 [details] [diff] [review]: ----------------------------------------------------------------- r=me ::: toolkit/components/timermanager/nsUpdateTimerManager.js @@ +84,1 @@ > 30000), minFirstInterval); Heh, it's amusing you don't need to adjust this indent.
Attachment #8940280 - Flags: review?(gijskruitbosch+bugs) → review+
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla59
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: