Last Comment Bug 758915 - convert mailnews/base/content/*.js to Services.jsm and MailServices.js
: convert mailnews/base/content/*.js to Services.jsm and MailServices.js
Status: RESOLVED FIXED
:
Product: MailNews Core
Classification: Components
Component: Backend (show other bugs)
: Trunk
: All All
: -- minor (vote)
: Thunderbird 16.0
Assigned To: :aceman
:
Mentors:
Depends on:
Blocks: 720356 720358
  Show dependency treegraph
 
Reported: 2012-05-26 16:56 PDT by :aceman
Modified: 2012-06-09 06:53 PDT (History)
2 users (show)
ryanvm: in‑testsuite-
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
patch (25.89 KB, patch)
2012-05-27 05:43 PDT, :aceman
no flags Details | Diff | Splinter Review
patch v2 (32.22 KB, patch)
2012-05-27 12:11 PDT, :aceman
mconley: review+
Details | Diff | Splinter Review
patch v3 (32.14 KB, patch)
2012-06-06 14:21 PDT, :aceman
acelists: review+
Details | Diff | Splinter Review
patch v4 (32.15 KB, patch)
2012-06-07 13:18 PDT, :aceman
acelists: review+
Details | Diff | Splinter Review

Description :aceman 2012-05-26 16:56:01 PDT
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"]
Comment 1 :aceman 2012-05-27 05:43:54 PDT
Created attachment 627557 [details] [diff] [review]
patch
Comment 2 :aceman 2012-05-27 12:11:15 PDT
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.
Comment 3 Mark Banner (:standard8) 2012-06-05 03:47:03 PDT
Comment on attachment 627581 [details] [diff] [review]
patch v2

Busy this week, so passing review over.
Comment 4 Mike Conley (:mconley) - (Needinfo me!) 2012-06-06 10:39:54 PDT
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.
Comment 5 :aceman 2012-06-06 14:21:41 PDT
Created attachment 630719 [details] [diff] [review]
patch v3

Thanks, done.
Comment 6 :aceman 2012-06-07 13:18:36 PDT
Created attachment 631099 [details] [diff] [review]
patch v4

Fixes bitrot in junklog.js.
Comment 7 Mike Conley (:mconley) - (Needinfo me!) 2012-06-07 13:21:28 PDT
https://hg.mozilla.org/comm-central/rev/d1233611df23

Note You need to log in before you can comment on or make changes to this bug.