Bug 1129605 - Always call Map/Set/WeakMap constructors with 'new': mail and mailnews. r=mkmelin

This commit is contained in:
Sebastian Hengst 2015-02-16 10:50:27 +01:00
Родитель 79c5277a4e
Коммит e06118b5fe
6 изменённых файлов: 6 добавлений и 6 удалений

Просмотреть файл

@ -1443,7 +1443,7 @@ function ThreadPaneOnDragStart(aEvent) {
* of existing names.
*
* Example use:
* suggestUniqueFileName("testname", ".txt", Set("testname", "testname1"))
* suggestUniqueFileName("testname", ".txt", new Set("testname", "testname1"))
* returns "testname2.txt"
* Does not check file system for existing files.
*

Просмотреть файл

@ -15,7 +15,7 @@ nsAbAutoCompleteMyDomain.prototype = {
cachedIdKey: "",
cachedIdentity: null,
applicableHeaders: Set(["addr_to", "addr_cc", "addr_bcc", "addr_reply"]),
applicableHeaders: new Set(["addr_to", "addr_cc", "addr_bcc", "addr_reply"]),
startSearch: function(aString, aSearchParam, aResult, aListener) {
let params = JSON.parse(aSearchParam);

Просмотреть файл

@ -85,7 +85,7 @@ nsAbAutoCompleteSearch.prototype = {
_commentColumn: 0,
_parser: MailServices.headerParser,
_abManager: MailServices.ab,
applicableHeaders: Set(["addr_to", "addr_cc", "addr_bcc", "addr_reply"]),
applicableHeaders: new Set(["addr_to", "addr_cc", "addr_bcc", "addr_reply"]),
// Private methods

Просмотреть файл

@ -105,7 +105,7 @@ nsAbLDAPAutoCompleteSearch.prototype = {
_parser: MailServices.headerParser,
applicableHeaders: Set(["addr_to", "addr_cc", "addr_bcc", "addr_reply"]),
applicableHeaders: new Set(["addr_to", "addr_cc", "addr_bcc", "addr_reply"]),
// Private methods

Просмотреть файл

@ -322,7 +322,7 @@ MimeAddressParser.prototype = {
}
// First, collect all of the emails to forcibly delete.
let allAddresses = Set();
let allAddresses = new Set();
for (let element of this.parseDecodedHeader(aOtherAddrs, false)) {
allAddresses.add(normalize(element.email));
}

Просмотреть файл

@ -11,7 +11,7 @@ Cu.import("resource:///modules/mailServices.js");
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
const kACR = Ci.nsIAutoCompleteResult;
const kSupportedTypes = Set(["addr_newsgroups", "addr_followup"]);
const kSupportedTypes = new Set(["addr_newsgroups", "addr_followup"]);
function nsNewsAutoCompleteResult(aSearchString) {
// Can't create this in the prototype as we'd get the same array for