Closed Bug 722168 Opened 12 years ago Closed 12 years ago

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

Categories

(MailNews Core :: Networking, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 13.0

People

(Reporter: aceman, Assigned: aceman)

References

Details

Attachments

(1 file, 1 obsolete file)

      No description provided.
Attached patch patch (obsolete) — Splinter Review
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-
Attached patch patch v2Splinter Review
Fixes nits.
Attachment #592516 - Attachment is obsolete: true
Attachment #595451 - Flags: review?(mbanner)
Attachment #595451 - Flags: review?(mbanner) → review+
Keywords: checkin-needed
Checked in: http://hg.mozilla.org/comm-central/rev/d4652eaa1a30
Status: ASSIGNED → RESOLVED
Closed: 12 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.

Attachment

General

Creator:
Created:
Updated:
Size: