Closed Bug 1117060 Opened 10 years ago Closed 10 years ago

remove deprecated let expressions in comm-central

Categories

(Thunderbird :: General, defect)

defect
Not set
trivial

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 38.0

People

(Reporter: aceman, Assigned: aceman)

References

Details

Attachments

(5 files, 3 obsolete files)

Warning: JavaScript 1.7's let expressions are deprecated Source File: chrome://gloda/content/glodacomplete.xml Line: 133, Column: 12 Source Code: start == 0 ? a[1] - b[1] : start);
There seem to be some more ocurrences of this pattern: calendar/test/mozmill/testLocalICS.js 93 let (str = {}) { calendar/test/unit/test_bug350845.js 19 let (passed = false) { 36 let (passed = false) { im/content/preferences/applications.js 1045 let (preferredApp = aHandlerInfo.preferredApplicationHandler) { mail/components/preferences/applications.js 1797 let (preferredApp = aHandlerInfo.preferredApplicationHandler) { mailnews/db/gloda/content/glodacomplete.xml 132 regions = regions.sort(function(a, b) let (start = a[0] - b[0]) suite/common/places/tests/browser/head.js 4 let (getter = PlacesUIUtils.__lookupGetter__("leftPaneFolderId")) { 10 let (getter = PlacesUIUtils.__lookupGetter__("leftPaneFolderId")) { suite/common/places/tests/unit/head_bookmarks.js 14 let (commonFile = do_get_file("../../../../../toolkit/components/places/tests/head_common.js", false)) { 33 let (XULAppInfo = { suite/common/pref/pref-applications.js 1685 let (preferredApp = aHandlerInfo.preferredApplicationHandler) {
Assignee: nobody → acelists
Status: NEW → ASSIGNED
Summary: deprecated let expression in gloda/content/glodacomplete.xml → remove deprecated let expressions in comm-central
Attached patch patch for IM (deleted) — Splinter Review
Attached patch patch for calendar (obsolete) (deleted) — Splinter Review
Attached patch patch for mailnews (obsolete) (deleted) — Splinter Review
Attached patch patch for suite (deleted) — Splinter Review
Attached patch patch for mail (deleted) — Splinter Review
Aryx, please push all to the try server, all tests. Thanks.
Flags: needinfo?(archaeopteryx)
Attachment #8549197 - Flags: review?(florian)
Attachment #8549198 - Flags: review?(philipp)
Attachment #8549199 - Flags: review?(Pidgeot18)
Attachment #8549200 - Flags: review?(neil)
Attachment #8549201 - Flags: review?(mkmelin+mozilla)
So I didn't spot anything in the test runs so I mark the review requests.
Comment on attachment 8549197 [details] [diff] [review] patch for IM Review of attachment 8549197 [details] [diff] [review]: ----------------------------------------------------------------- Thanks!
Attachment #8549197 - Flags: review?(florian) → review+
Comment on attachment 8549198 [details] [diff] [review] patch for calendar Review of attachment 8549198 [details] [diff] [review]: ----------------------------------------------------------------- Thanks for the patch, r=philipp with these minor nits: ::: calendar/test/mozmill/testLocalICS.js @@ +91,5 @@ > cstream.init(fstream, "UTF-8", 0, 0); > + > + let str = {}; > + cstream.readString(-1, str); > + contents = str.value; Please just remove the contents variable and then this shortly below: controller.assertJS(str.value.indexOf("SUMMARY:" + title) != -1); ::: calendar/test/unit/test_bug350845.js @@ +20,5 @@ > + try { > + event.setPropertyParameter("X-UNKNOWN", "UNKNOWN", "VALUE"); > + } catch (e) { > + passed = true; > + } I think you can just use this (untested): do_check_throws(function() { event.setPropertyParameter("X-UNKNOWN", "UNKNOWN", "VALUE"); }, "Property X-UNKNOWN not set"); That would save us from that extra |passed| variable. @@ +38,5 @@ > + } catch (e) { > + passed = true; > + } > + if (!passed) { > + do_throw("Getting parameter enumerator on unset property unexpectedly succeeded"); do_check_throws(function() { event.getParameterEnumerator("X-UNKNOWN"); }, "Property X-UNKNOWN not set");
Attachment #8549198 - Flags: review?(philipp) → review+
Comment on attachment 8549199 [details] [diff] [review] patch for mailnews Review of attachment 8549199 [details] [diff] [review]: ----------------------------------------------------------------- ::: mailnews/db/gloda/content/glodacomplete.xml @@ +131,5 @@ > // Sort the regions by start position then end position > + regions = regions.sort(function(a, b) { > + let start = a[0] - b[0]; > + return (start == 0) ? a[1] - b[1] : start; } > + ); Nit: Prefer }); over }\n);. Otherwise, okay.
Attachment #8549199 - Flags: review?(Pidgeot18) → review+
Attachment #8549201 - Flags: review?(mkmelin+mozilla) → review+
Attached patch patch for mailnews v1.1 (deleted) — Splinter Review
Attachment #8549199 - Attachment is obsolete: true
Attachment #8551860 - Flags: review+
Attached patch patch for calendar v1.1 (obsolete) (deleted) — Splinter Review
Attachment #8549198 - Attachment is obsolete: true
Attachment #8551978 - Flags: review?(philipp)
Attached patch patch for calendar v1.2 (deleted) — Splinter Review
I've tested the xpcshell calendar tests locally with this patch and it works. mozmill looks fine codewise but I can't run them locally. I think this is fine, I can fix it if it should break. r+ for the calendar part.
Attachment #8551978 - Attachment is obsolete: true
Attachment #8551978 - Flags: review?(philipp)
Attachment #8552001 - Flags: review+
Attachment #8549200 - Flags: review?(neil) → review+
Thanks to all.
Component: Search → General
Keywords: checkin-needed
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: