Closed Bug 1118263 Opened 10 years ago Closed 10 years ago

C-C TB: JavaScript 1.6's for-each-in loops are deprecated in accountprovisioner and about-support

Categories

(Thunderbird :: General, defect)

defect
Not set
minor

Tracking

(thunderbird40 fixed)

RESOLVED FIXED
Thunderbird 40.0
Tracking Status
thunderbird40 --- fixed

People

(Reporter: ishikawa, Assigned: aceman)

References

Details

Attachments

(1 file)

For a few weeks now, I see the following type of warning messages in the log printed to the tty console where |make mozmill| test suite of TB is invoked. I am running full DEBUG version of TB locally compiled under 64-bit Debian GNU/Linux. I see Bug 824104 - Remove for each... in loops from mail and mailnews code but I am not sure if that addresses the same issue. And maybe, these lines were some code snippets that fell off the radar when the above bug was filed (or maybe new code introduced since then. TIA The number at the beginning is the # of occurrences. 35 JavaScript warning: chrome://messenger/content/newmailaccount/accountProvisioner.js, line 810: JavaScript 1.6's for-each-in loops are deprecated; consider using ES6 for-of instead 35 JavaScript warning: chrome://messenger/content/newmailaccount/accountProvisioner.js, line 754: JavaScript 1.6's for-each-in loops are deprecated; consider using ES6 for-of instead 35 JavaScript warning: chrome://messenger/content/newmailaccount/accountProvisioner.js, line 735: JavaScript 1.6's for-each-in loops are deprecated; consider using ES6 for-of instead 35 JavaScript warning: chrome://messenger/content/newmailaccount/accountProvisioner.js, line 574: JavaScript 1.6's for-each-in loops are deprecated; consider using ES6 for-of instead 35 JavaScript warning: chrome://messenger/content/accountcreation/sanitizeDatatypes.js, line 154: JavaScript 1.6's for-each-in loops are deprecated; consider using ES6 for-of instead 35 JavaScript warning: chrome://gloda/content/glodacomplete.xml, line 133: JavaScript 1.7's let expressions are deprecated 10 JavaScript warning: chrome://messenger/content/about-support/prefs.js, line 115: JavaScript 1.6's for-each-in loops are deprecated; consider using ES6 for-of instead 10 JavaScript warning: chrome://messenger/content/about-support/init.js, line 91: JavaScript 1.6's for-each-in loops are deprecated; consider using ES6 for-of instead 10 JavaScript warning: chrome://messenger/content/about-support/accounts.js, line 86: JavaScript 1.6's for-each-in loops are deprecated; consider using ES6 for-of instead
oops, there is a single line about 35 JavaScript warning: chrome://gloda/content/glodacomplete.xml, line 133: JavaScript 1.7's let expressions are deprecated and this is the topic of Bug 1117060 - deprecated let expression in gloda/content/glodacomplete.xml
Component: Untriaged → General
Yeah, this seems similar to bug 824104. But we can't fix all "for each" in a single bug (there are thousands: http://mxr.mozilla.org/comm-central/search?string=for+each+%28&find=&findi=&filter=^[^\0]*%24&hitlimit=&tree=comm-central). So let's use this bug for cleaning up the warnings in accountProvisioner and about-support files as you posted in comment 0.
Assignee: nobody → acelists
Blocks: 824104
Hardware: x86_64 → All
Summary: C-C TB: JavaScript 1.6's for-each-in loops are deprecated → C-C TB: JavaScript 1.6's for-each-in loops are deprecated in accountprovisioner and about-support
Version: unspecified → Trunk
Attached patch patchSplinter Review
This should do it.
Attachment #8585601 - Flags: review?(mkmelin+mozilla)
Attachment #8585601 - Flags: feedback?(ishikawa)
Status: NEW → ASSIGNED
Depends on: 1149247
Comment on attachment 8585601 [details] [diff] [review] patch Review of attachment 8585601 [details] [diff] [review]: ----------------------------------------------------------------- LGTM! r=mkmelin
Attachment #8585601 - Flags: review?(mkmelin+mozilla) → review+
(In reply to Magnus Melin from comment #4) > Comment on attachment 8585601 [details] [diff] [review] > patch > > Review of attachment 8585601 [details] [diff] [review]: > ----------------------------------------------------------------- > > LGTM! r=mkmelin I think your patch is OK. Thank you. Just a note. I tested your patch. First, please note that some errors show up in a timing-dependent manner during |make mozmill| Sometimes I see them. Sometimes I do not. Here are exceptions that were noticed during |make mozmill| runs on my PC. March 20 EXCEPTION: Timeout waiting for modal dialog to open. EXCEPTION: Timeout waiting for alert EXCEPTION: Timeout waiting for modal dialog to open. EXCEPTION: el is null EXCEPTION: Timeout waiting for alert EXCEPTION: Component returned failure code: 0xc3c3c3c3 [nsIMsgFilterService.applyFilters] (The last one has been fixed since.) March 25 EXCEPTION: Timeout waiting for modal dialog to open. EXCEPTION: Timeout waiting for alert EXCEPTION: Timeout waiting for modal dialog to open. EXCEPTION: el is null EXCEPTION: Timeout waiting for alert March 27 (with address sanitizer) EXCEPTION: a != b: 'false' != 'true'. <--- this one seems to happen from time to time EXCEPTION: Timeout waiting for modal dialog to open. EXCEPTION: Timeout waiting for alert EXCEPTION: Timeout waiting for modal dialog to open. EXCEPTION: el is null EXCEPTION: Timeout waiting for alert March 29 (a whole set of new errors appear!) EXCEPTION: Timeout waiting for modal dialog to open. EXCEPTION: Timeout waiting for alert EXCEPTION: Timeout waiting for modal dialog to open. EXCEPTION: el is null EXCEPTION: Timeout waiting for alert <--- up to here, familiar ones. But see the following ones! EXCEPTION: formatted size is not numeric: 'Read' EXCEPTION: formatted size is not numeric: 'Read' EXCEPTION: formatted size is not numeric: 'Read' EXCEPTION: Timeout trying to enter folder mailbox://nobody@Local%20Folders/OpeningMessagesNoBackingViewA EXCEPTION: Timeout trying to enter folder mailbox://nobody@Local%20Folders/OpeningMessagesNoBackingViewA EXCEPTION: Timeout trying to enter folder mailbox://nobody@Local%20Folders/OpeningMessagesNoBackingViewA EXCEPTION: this.view.dbView is null <--- this is also seen from time to time. EXCEPTION: Timeout trying to enter folder mailbox://nobody@Local%20Folders/OpeningMessagesNoBackingViewA EXCEPTION: Timeout trying to enter folder mailbox://nobody@Local%20Folders/OpeningMessagesNoBackingViewA EXCEPTION: Timeout trying to enter folder mailbox://nobody@Local%20Folders/OpeningMessagesNoBackingViewA EXCEPTION: Found visible column 'correspondentCol' but was expecting 'recipientCol'! EXCEPTION: folderDisplay.selectedMessage != messageDisplay.displayedMessage! (fd: [xpconnect wrapped nsIMsgDBHdr @ 0x60800035dba0 (native @ 0x60b0000fdeb0)] vs md: null) EXCEPTION: folderDisplay.selectedMessage != messageDisplay.displayedMessage! (fd: [xpconnect wrapped nsIMsgDBHdr @ 0x60800035c0a0 (native @ 0x60b0000fefe0)] vs md: null) EXCEPTION: folderDisplay.selectedMessage != messageDisplay.displayedMessage! (fd: [xpconnect wrapped nsIMsgDBHdr @ 0x608000486c20 (native @ 0x60b000108250)] vs md: null) ======================================== April 1 (with your patch) EXCEPTION: Timeout waiting for modal dialog to open. EXCEPTION: Not a send error dialog; title=Write: (no subject) <--- this one also appeared from time to time. EXCEPTION: nb.getNotificationWithValue is not a function <--- this one also appeared from time to time. But relatively new. The first appearance was on Nov 24, 2014. EXCEPTION: Timeout waiting for alert EXCEPTION: Timeout waiting for modal dialog to open. EXCEPTION: el is null EXCEPTION: Timeout waiting for alert EXCEPTION: formatted size is not numeric: 'Read' EXCEPTION: formatted size is not numeric: 'Read' EXCEPTION: formatted size is not numeric: 'Read' EXCEPTION: Timeout trying to enter folder mailbox://nobody@Local%20Folders/OpeningMessagesNoBackingViewA EXCEPTION: Timeout trying to enter folder mailbox://nobody@Local%20Folders/OpeningMessagesNoBackingViewA EXCEPTION: Timeout trying to enter folder mailbox://nobody@Local%20Folders/OpeningMessagesNoBackingViewA EXCEPTION: this.view.dbView is null EXCEPTION: Timeout trying to enter folder mailbox://nobody@Local%20Folders/OpeningMessagesNoBackingViewA EXCEPTION: Timeout trying to enter folder mailbox://nobody@Local%20Folders/OpeningMessagesNoBackingViewA EXCEPTION: Timeout trying to enter folder mailbox://nobody@Local%20Folders/OpeningMessagesNoBackingViewA EXCEPTION: Found visible column 'correspondentCol' but was expecting 'recipientCol'! EXCEPTION: folderDisplay.selectedMessage != messageDisplay.displayedMessage! (fd: [xpconnect wrapped nsIMsgDBHdr @ 0x5200bc0 (native @ 0x51d3a80)] vs md: null) EXCEPTION: folderDisplay.selectedMessage != messageDisplay.displayedMessage! (fd: [xpconnect wrapped nsIMsgDBHdr @ 0x417ac70 (native @ 0x522aa80)] vs md: null) EXCEPTION: folderDisplay.selectedMessage != messageDisplay.displayedMessage! (fd: [xpconnect wrapped nsIMsgDBHdr @ 0x66375c0 (native @ 0x502d080)] vs md: null) ======================================== April 1 (without your patch) EXCEPTION: Timeout waiting for modal dialog to open. EXCEPTION: formatted size is not numeric: 'Read' EXCEPTION: formatted size is not numeric: 'Read' EXCEPTION: formatted size is not numeric: 'Read' EXCEPTION: Timeout trying to enter folder mailbox://nobody@Local%20Folders/OpeningMessagesNoBackingViewA EXCEPTION: Timeout trying to enter folder mailbox://nobody@Local%20Folders/OpeningMessagesNoBackingViewA EXCEPTION: Timeout trying to enter folder mailbox://nobody@Local%20Folders/OpeningMessagesNoBackingViewA EXCEPTION: this.view.dbView is null EXCEPTION: Timeout trying to enter folder mailbox://nobody@Local%20Folders/OpeningMessagesNoBackingViewA EXCEPTION: Timeout trying to enter folder mailbox://nobody@Local%20Folders/OpeningMessagesNoBackingViewA EXCEPTION: Timeout trying to enter folder mailbox://nobody@Local%20Folders/OpeningMessagesNoBackingViewA EXCEPTION: Found visible column 'correspondentCol' but was expecting 'recipientCol'! EXCEPTION: folderDisplay.selectedMessage != messageDisplay.displayedMessage! (fd: [xpconnect wrapped nsIMsgDBHdr @ 0x553afd0 (native @ 0x54fd920)] vs md: null) EXCEPTION: folderDisplay.selectedMessage != messageDisplay.displayedMessage! (fd: [xpconnect wrapped nsIMsgDBHdr @ 0x31971a0 (native @ 0x552a910)] vs md: null) EXCEPTION: folderDisplay.selectedMessage != messageDisplay.displayedMessage! (fd: [xpconnect wrapped nsIMsgDBHdr @ 0x28da8d0 (native @ 0x5573ed0)] vs md: null) ======================================== With your patch, somehow I think I see a slew of old errors and a few more. ( I repeated the test twice and so fairly confident.) + EXCEPTION: Not a send error dialog; title=Write: (no subject) <--- error that happened sometimes. + EXCEPTION: nb.getNotificationWithValue is not a function <--- error that happened sometimes. + EXCEPTION: Timeout waiting for alert <--- This one is from SUMMARY-UNEXPECTED-FAIL | test-install-xpi.js | test-install-xpi.js::test_install_corrupt_xpi EXCEPTION: Timeout waiting for alert + EXCEPTION: Timeout waiting for modal dialog to open. <--- this one is from SUMMARY-UNEXPECTED-FAIL | test-install-xpi.js | test-install-xpi.js::test_install_xpi_offer EXCEPTION: Timeout waiting for modal dialog to open. + EXCEPTION: el is null <--- SUMMARY-UNEXPECTED-FAIL | test-install-xpi.js | test-install-xpi.js::test_xpinstall_disabled EXCEPTION: el is null + EXCEPTION: Timeout waiting for alert <--- SUMMARY-UNEXPECTED-FAIL | test-install-xpi.js | test-install-xpi.js::test_xpinstall_actually_install EXCEPTION: Timeout waiting for alert I am trying to digest this. So it looks as if the latest change in the source tree caused new errors to appear, but somehow some old errors were removed. But some old errors reappear with your patch (!?). Then I realized these old errors are from test-install-xpi.js which never seemed to work very well on this particular PC anyway: maybe it has something to do with the failed interaction with the (fake remote?) xpi provider (?) I think I need to dig into these new errors that suddenly appear since the weekend and see if I can correlate the re-appearance of the old bugs with your patch in the presence of the new bugs (and the code changes that produced these). Generally speaking, though, I think your patch is OK. It is unfortunate that some changes took place just before your patch was proposed. I was trying to see if valgrind could work with the latest C-C and so felt obliged to upgrade the code just in case. I tried to see if the same errors are noticed by others, but it seems tryserver, er, treeherder (?) runs have been incomplete since mozmill test could not be run due to configuration errors. So I could not compare the errors with mine. TIA
I filed Bug 1150051 - C-C TB: EXCEPTION: formatted size is not numeric: 'Read' to look into the new unrelated bug.
But you should focus on the exact errors described in comment 0, whether the number of those has fallen. The new errors are to be handled separatelly (but do not file them yet until mozmill tests actually start working again on mozilla servers).
Keywords: checkin-needed
(In reply to :aceman from comment #7) > But you should focus on the exact errors described in comment 0, whether the > number of those has fallen. The new errors are to be handled separatelly > (but do not file them yet until mozmill tests actually start working again > on mozilla servers). The loop errors are gone by your patch, thank you. It is unfortunate that mozmill test doesn't run currently on try server. TIA
Attachment #8585601 - Flags: feedback?(ishikawa) → feedback+
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 40.0
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: