Closed Bug 738792 Opened 12 years ago Closed 12 years ago

fix strict Javascript warnings in Thunderbird addressbook (found in Error console)

Categories

(Thunderbird :: Address Book, defect)

defect
Not set
trivial

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 16.0

People

(Reporter: aceman, Assigned: aceman)

Details

Attachments

(1 file)

Timestamp: 23.03.2012 22:07:04
Warning: octal literals and octal escape sequences are deprecated
Source File: chrome://messenger/content/addressbook/abTrees.js
Line: 158, Column: 46
Source Code:
      foStream.init(file, 0x02 | 0x08 | 0x20, 0666, 0); 

Timestamp: 23.03.2012 22:07:04
Warning: function getDirectoryValue does not always return a value
Source File: chrome://messenger/content/addressbook/abTrees.js
Line: 207

Timestamp: 23.03.2012 22:07:04
Warning: octal literals and octal escape sequences are deprecated
Source File: chrome://messenger/content/addressbook/abCommon.js
Line: 875, Column: 62
Source Code:
    file.create(Components.interfaces.nsIFile.DIRECTORY_TYPE, 0777);
Mconley, what can be used instead of the octal values?
aceman:

Hm... maybe something like this?  https://bugzilla.mozilla.org/attachment.cgi?id=452323&action=diff

I'm surprised there's not a more graceful solution...that looks kind of like a hack.

-Mike
Thanks.
Do you want the parseInt() inline or can I create some descriptive constants for the 2 values?
I'm a fan of declaring constants - I'd recommend going that route.
Are those permission actually correct?
Do we want the file world-writable and dirs world-accessible? Or is that some kind of mask, not the final permissions?
CC'ing Standard8, who might know more about how we should be setting file permissions...
Timestamp: 26.03.2012 23:23:31
Warning: assignment to undeclared variable j
Source File: chrome://messenger/content/addressbook/abDragDrop.js
Line: 291
(In reply to :aceman from comment #5)
> Are those permission actually correct?
> Do we want the file world-writable and dirs world-accessible? Or is that
> some kind of mask, not the final permissions?
(In reply to Mike Conley (:mconley) from comment #6)
> CC'ing Standard8, who might know more about how we should be setting file
> permissions...

Standard8, any ideas here?
OS: Linux → All
Hardware: x86 → All
Attached patch patchSplinter Review
So let's start with something.
Attachment #635080 - Flags: review?(mconley)
Attachment #635080 - Flags: feedback?(mbanner)
Status: NEW → ASSIGNED
Comment on attachment 635080 [details] [diff] [review]
patch

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

Looks good to me. Thanks aceman!
Attachment #635080 - Flags: review?(mconley) → review+
Do we need more reviews here?
Nope, mconley is enough :-)
Attachment #635080 - Flags: feedback?(mbanner)
Ok, thanks.
Keywords: checkin-needed
https://hg.mozilla.org/comm-central/rev/2b7433987db1
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Flags: in-testsuite-
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 16.0
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: