Last Comment Bug 738792 - fix strict Javascript warnings in Thunderbird addressbook (found in Error console)
: fix strict Javascript warnings in Thunderbird addressbook (found in Error con...
Status: RESOLVED FIXED
:
Product: Thunderbird
Classification: Client Software
Component: Address Book (show other bugs)
: Trunk
: All All
: -- trivial (vote)
: Thunderbird 16.0
Assigned To: :aceman
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-23 14:09 PDT by :aceman
Modified: 2012-07-03 15:50 PDT (History)
4 users (show)
ryanvm: in‑testsuite-
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
patch (5.96 KB, patch)
2012-06-20 14:53 PDT, :aceman
mconley: review+
Details | Diff | Review

Description :aceman 2012-03-23 14:09:51 PDT
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);
Comment 1 :aceman 2012-03-26 07:45:50 PDT
Mconley, what can be used instead of the octal values?
Comment 2 Mike Conley (:mconley) - (needinfo me!) 2012-03-26 07:49:45 PDT
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
Comment 3 :aceman 2012-03-26 07:56:59 PDT
Thanks.
Do you want the parseInt() inline or can I create some descriptive constants for the 2 values?
Comment 4 Mike Conley (:mconley) - (needinfo me!) 2012-03-26 07:57:56 PDT
I'm a fan of declaring constants - I'd recommend going that route.
Comment 5 :aceman 2012-03-26 11:40:28 PDT
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?
Comment 6 Mike Conley (:mconley) - (needinfo me!) 2012-03-26 11:46:41 PDT
CC'ing Standard8, who might know more about how we should be setting file permissions...
Comment 7 :aceman 2012-03-26 14:25:36 PDT
Timestamp: 26.03.2012 23:23:31
Warning: assignment to undeclared variable j
Source File: chrome://messenger/content/addressbook/abDragDrop.js
Line: 291
Comment 8 :aceman 2012-04-25 02:00:36 PDT
(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?
Comment 9 :aceman 2012-06-20 14:53:35 PDT
Created attachment 635080 [details] [diff] [review]
patch

So let's start with something.
Comment 10 Mike Conley (:mconley) - (needinfo me!) 2012-07-03 11:26:09 PDT
Comment on attachment 635080 [details] [diff] [review]
patch

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

Looks good to me. Thanks aceman!
Comment 11 :aceman 2012-07-03 12:13:52 PDT
Do we need more reviews here?
Comment 12 Mark Banner (:standard8) 2012-07-03 12:20:37 PDT
Nope, mconley is enough :-)
Comment 13 :aceman 2012-07-03 12:35:52 PDT
Ok, thanks.
Comment 14 Ryan VanderMeulen [:RyanVM] 2012-07-03 15:50:36 PDT
https://hg.mozilla.org/comm-central/rev/2b7433987db1

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