Closed Bug 1073951 Opened 10 years ago Closed 10 years ago

octal literals and octal escape sequences are deprecated: ... mozmill/extension/resource/modules/utils.js

Categories

(Thunderbird :: Testing Infrastructure, defect)

defect
Not set
trivial

Tracking

(thunderbird36 fixed)

RESOLVED FIXED
Thunderbird 36.0
Tracking Status
thunderbird36 --- fixed

People

(Reporter: ishikawa, Assigned: ishikawa)

References

Details

Attachments

(1 file, 1 obsolete file)

During testing of DEBUG version of TB using "make mozmill" test suite
run, I noticed that the following message and a few similar
lines printed for the same file:
comm-central/mail/test/resources/mozmill/mozmill/extension/resource/modules/utils.js

JavaScript strict warning: resource://mozmill/modules/utils.js, line 135: SyntaxError: octal literals and octal escape sequences are deprecated

A patch to replace octet literal(s) with call(s) to ParseInt(..., 8)
is attached.
Blocks: 826732
Don't forget to ask for review.
Assignee: nobody → ishikawa
Attachment #8496551 - Flags: review?(standard8)
(In reply to Magnus Melin from comment #1)
> Don't forget to ask for review.

Thanks for the reminder. I should have known to use the "suggested reviewers" feature.
I have been away from submitting bugzilla entry for too long (for about three months :-)
See Also: → 1073955
Comment on attachment 8496551 [details] [diff] [review]
Replaced literal octal string(s) with ParseInt() call(s).

Normally, I'd say to patch the upstream repo, as this is MozMill - however the latest code doesn't have these octals in it afaict, so I think its fine to take this.
Attachment #8496551 - Flags: review?(standard8) → review+
(Sorry there was a misspelling of ParseInt for parseint which was not
warned by JS and mozmill framework (!?)

(I have four similar bugzilla entries/patches. Here is a template
response.)

Thank you for the review.

I am uploading a new patch with that uses "0o" prefix for
octal literal. It seems "0o..." notation is preferred over
parseInt(..., 8).

Regarding the misspelling of "ParseInt" for "parseint",
I thought initially people were referring to the misspelling
in the description field of my patch.

I said "Whoa!" when I realized that the code itself had this misspelling(!)

SURPRISE: I had applied the patch to my source tree, and had run the
|make mozmill| test, and JS and mozmill test frame never printed a
single complaint about this (!!!)

That is why I did not realize the misspelling in the code portion of
the patch.

I carefully checked the log files and found no mention of ParseInt at
all. Also, the number of failed errors were not that much
different before and after the patch.
(Because of timing-sensitive errors that happen during shutdown (bugs), etc.,
the number of failed errors may differ from one run to the other. I
did not see any major errors possibly due to the "ParseInt"
misspellings.)
So, I think JS interpreter is doing something without aborting the 
execution.

What gives? I think this merits a new bugzilla entry...

Anyway, the simple "Use 0o prefix for octal literal" patch is
uploaded.

TIA
Attachment #8496551 - Attachment is obsolete: true
Attachment #8497246 - Flags: review?(standard8)
Attachment #8497246 - Flags: review?(standard8) → review+
Keywords: checkin-needed
http://hg.mozilla.org/comm-central/rev/0619d65e25e2
Status: NEW → RESOLVED
Closed: 10 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 36.0
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: