convert mailnews/extensions/offline-startup/js/offlineStartup.js to Services.jsm

RESOLVED FIXED in Thunderbird 13.0

Status

MailNews Core
Networking
RESOLVED FIXED
6 years ago
5 years ago

People

(Reporter: aceman, Assigned: aceman)

Tracking

(Blocks: 1 bug)

Trunk
Thunderbird 13.0

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

8.42 KB, patch
standard8
: review+
Details | Diff | Splinter Review
Comment hidden (empty)
(Assignee)

Comment 1

6 years ago
Created attachment 592516 [details] [diff] [review]
patch
Assignee: nobody → acelists
Status: NEW → ASSIGNED
Attachment #592516 - Flags: review?(mbanner)
Comment on attachment 592516 [details] [diff] [review]
patch

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

::: mailnews/extensions/offline-startup/js/offlineStartup.js
@@ +40,4 @@
>  Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
>  
> +const kDebug              = false;
> +const kBundleURI          = "chrome://messenger/locale/offlineStartup.properties";

We only use this in one place, so there's no point in this being a const.

@@ +67,5 @@
>    onProfileStartup: function()
>    {
>      debug("onProfileStartup");
>  
> +    var ioService = Services.io;

Having had a discussion about this, I think we should drop the intermediate variable/alias - it'll be clearer to everyone and javascript should optimise nicely anyway.

Ditto with prefs and promptService

@@ +115,2 @@
>  
>        var bundle = getBundle(kBundleURI);

We should just kill the getBundle function - we don't do that intense checking elsewhere, and if getting the string bundle is failing, then we've got automation issues somewhere as it should have been picked up.
Attachment #592516 - Flags: review?(mbanner) → review-
(Assignee)

Comment 3

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

Fixes nits.
Attachment #592516 - Attachment is obsolete: true
Attachment #595451 - Flags: review?(mbanner)
Attachment #595451 - Flags: review?(mbanner) → review+
(Assignee)

Updated

5 years ago
Keywords: checkin-needed
Checked in: http://hg.mozilla.org/comm-central/rev/d4652eaa1a30
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 13.0
You need to log in before you can comment on or make changes to this bug.