Closed Bug 758915 Opened 12 years ago Closed 12 years ago

convert mailnews/base/content/*.js to Services.jsm and MailServices.js

Categories

(MailNews Core :: Backend, defect)

defect
Not set
minor

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 16.0

People

(Reporter: aceman, Assigned: aceman)

References

Details

Attachments

(1 file, 3 obsolete files)

dateFormat.js:    var pref = Components.classes["@mozilla.org/preferences-service;1"]
folderProps.js:    var prefs = Components.classes["@mozilla.org/preferences-service;1"]
junkCommands.js:      Components.classes["@mozilla.org/messenger/messagecopyservice;1"]
junkCommands.js:      var junkService = Components.classes["@mozilla.org/messenger/filter-plugin;1?name=bayesianfilter"]
junkCommands.js:      var junkService = Components.classes["@mozilla.org/messenger/filter-plugin;1?name=bayesianfilter"]
junkLog.js:  var directoryService = Components.classes["@mozilla.org/file/directory_service;1"]
junkLog.js:    ioService = Components.classes["@mozilla.org/network/io-service;1"]
msgPrintEngine.js:    var strBundleService = Components.classes["@mozilla.org/intl/stringbundle;1"].
msgSynchronize.js:    var prefs = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);
msgSynchronize.js:    var prefs = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);
virtualFolderListDialog.js:  var accountManager = Components.classes["@mozilla.org/messenger/account-manager;1"].getService(Components.interfaces.nsIMsgAccountManager);
virtualFolderListDialog.js:  var accountManager = Components.classes["@mozilla.org/messenger/account-manager;1"].getService(Components.interfaces.nsIMsgAccountManager);
virtualFolderProperties.js:      Components.classes["@mozilla.org/embedcomp/prompt-service;1"]
virtualFolderProperties.js:    var accountManager = Components.classes["@mozilla.org/messenger/account-manager;1"].getService(Components.interfaces.nsIMsgAccountManager);
virtualFolderProperties.js:        Components.classes["@mozilla.org/embedcomp/prompt-service;1"]
virtualFolderProperties.js:        Components.classes["@mozilla.org/embedcomp/prompt-service;1"]
Attached patch patch (obsolete) — Splinter Review
Attachment #627557 - Flags: review?(mbanner)
Attached patch patch v2 (obsolete) — Splinter Review
I came across a JS strict warning about "redefining 'arguments'" in these files so I add it here too.
Attachment #627557 - Attachment is obsolete: true
Attachment #627557 - Flags: review?(mbanner)
Attachment #627581 - Flags: review?(mbanner)
Comment on attachment 627581 [details] [diff] [review]
patch v2

Busy this week, so passing review over.
Attachment #627581 - Flags: review?(mbanner) → review?(mconley)
Comment on attachment 627581 [details] [diff] [review]
patch v2

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

Just two nits. r=me with that fixed.

::: mail/components/preferences/junkLog.js
@@ +35,5 @@
>  # the terms of any one of the MPL, the GPL or the LGPL.
>  #
>  # ***** END LICENSE BLOCK *****
>  
> +// TODO: is it possible to merge this with /mailnews/base/content/junkLog.* ?

Instead of burying this as a TODO in the source, you should file a bug instead.

::: mailnews/base/content/dateFormat.js
@@ +139,5 @@
>  
> +      gSearchDateLeadingZeros =
> +        (Services.prefs.getComplexValue("mailnews.search_date_leading_zeros",
> +                                        Components.interfaces.nsIPrefLocalizedString)
> +                       .data == "true");

I'm not wild about the formatting of lines 140-143... not sure how best to clean it up, beyond breaking it up over a couple of statements.
Attachment #627581 - Flags: review?(mconley) → review+
Attached patch patch v3 (obsolete) — Splinter Review
Thanks, done.
Attachment #627581 - Attachment is obsolete: true
Attachment #630719 - Flags: review+
Keywords: checkin-needed
Attached patch patch v4Splinter Review
Fixes bitrot in junklog.js.
Attachment #630719 - Attachment is obsolete: true
Attachment #631099 - Flags: review+
https://hg.mozilla.org/comm-central/rev/d1233611df23
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 16.0
Flags: in-testsuite-
Keywords: checkin-needed
You need to log in before you can comment on or make changes to this bug.