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

RESOLVED FIXED in Thunderbird 16.0

Status

MailNews Core
Backend
--
minor
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: aceman, Assigned: aceman)

Tracking

(Blocks: 2 bugs)

Trunk
Thunderbird 16.0
Dependency tree / graph
Bug Flags:
in-testsuite -

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 3 obsolete attachments)

(Assignee)

Description

5 years ago
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"]
(Assignee)

Comment 1

5 years ago
Created attachment 627557 [details] [diff] [review]
patch
Attachment #627557 - Flags: review?(mbanner)
(Assignee)

Comment 2

5 years ago
Created attachment 627581 [details] [diff] [review]
patch v2

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+
(Assignee)

Comment 5

5 years ago
Created attachment 630719 [details] [diff] [review]
patch v3

Thanks, done.
Attachment #627581 - Attachment is obsolete: true
Attachment #630719 - Flags: review+
(Assignee)

Updated

5 years ago
Keywords: checkin-needed
(Assignee)

Comment 6

5 years ago
Created attachment 631099 [details] [diff] [review]
patch v4

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
Last Resolved: 5 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.