Backed out changeset 036615ba3257 (bug 1207498) for Linux pgo M(oth) failure

This commit is contained in:
Tooru Fujisawa 2015-09-27 23:42:50 +09:00
parent cd3db6670e
commit d0c131ca8d
32 changed files with 182 additions and 310 deletions

View File

@ -829,8 +829,8 @@ ContentPrefService2.prototype = {
cps._genericObservers = []; cps._genericObservers = [];
let tables = ["prefs", "groups", "settings"]; let tables = ["prefs", "groups", "settings"];
let stmts = tables.map(t => this._stmt(`DELETE FROM ${t}`)); let stmts = tables.map(function (t) this._stmt(`DELETE FROM ${t}`), this);
this._execStmts(stmts, { onDone: () => callback() }); this._execStmts(stmts, { onDone: function () callback() });
}, },
QueryInterface: function CPS2_QueryInterface(iid) { QueryInterface: function CPS2_QueryInterface(iid) {
@ -839,7 +839,7 @@ ContentPrefService2.prototype = {
Ci.nsIObserver, Ci.nsIObserver,
Ci.nsISupports, Ci.nsISupports,
]; ];
if (supportedIIDs.some(i => iid.equals(i))) if (supportedIIDs.some(function (i) iid.equals(i)))
return this; return this;
if (iid.equals(Ci.nsIContentPrefService)) if (iid.equals(Ci.nsIContentPrefService))
return this._cps; return this._cps;

View File

@ -59,7 +59,7 @@ ContentPrefService.prototype = {
Ci.nsIContentPrefService, Ci.nsIContentPrefService,
Ci.nsISupports, Ci.nsISupports,
]; ];
if (supportedIIDs.some(i => iid.equals(i))) if (supportedIIDs.some(function (i) iid.equals(i)))
return this; return this;
if (iid.equals(Ci.nsIContentPrefService2)) { if (iid.equals(Ci.nsIContentPrefService2)) {
if (!this._contentPrefService2) { if (!this._contentPrefService2) {

View File

@ -647,19 +647,19 @@ extApplication.prototype = {
get console() { get console() {
let console = new Console(); let console = new Console();
this.__defineGetter__("console", () => console); this.__defineGetter__("console", function () console);
return this.console; return this.console;
}, },
get storage() { get storage() {
let storage = new SessionStorage(); let storage = new SessionStorage();
this.__defineGetter__("storage", () => storage); this.__defineGetter__("storage", function () storage);
return this.storage; return this.storage;
}, },
get prefs() { get prefs() {
let prefs = new PreferenceBranch(""); let prefs = new PreferenceBranch("");
this.__defineGetter__("prefs", () => prefs); this.__defineGetter__("prefs", function () prefs);
return this.prefs; return this.prefs;
}, },
@ -687,7 +687,7 @@ extApplication.prototype = {
} }
let events = new Events(registerCheck); let events = new Events(registerCheck);
this.__defineGetter__("events", () => events); this.__defineGetter__("events", function () events);
return this.events; return this.events;
}, },

View File

@ -769,8 +769,8 @@ this.Download.prototype = {
if (!this._promiseCanceled) { if (!this._promiseCanceled) {
// Start a new cancellation request. // Start a new cancellation request.
let deferCanceled = Promise.defer(); let deferCanceled = Promise.defer();
this._currentAttempt.then(() => deferCanceled.resolve(), this._currentAttempt.then(function () deferCanceled.resolve(),
() => deferCanceled.resolve()); function () deferCanceled.resolve());
this._promiseCanceled = deferCanceled.promise; this._promiseCanceled = deferCanceled.promise;
// The download can already be restarted. // The download can already be restarted.

View File

@ -159,9 +159,7 @@ this.DownloadIntegration = {
/** /**
* Gets and sets test mode * Gets and sets test mode
*/ */
get testMode() { get testMode() this._testMode,
return this._testMode;
},
set testMode(mode) { set testMode(mode) {
this._downloadsDirectory = null; this._downloadsDirectory = null;
return (this._testMode = mode); return (this._testMode = mode);

View File

@ -51,21 +51,15 @@ this.Downloads = {
/** /**
* Work on downloads that were not started from a private browsing window. * Work on downloads that were not started from a private browsing window.
*/ */
get PUBLIC() { get PUBLIC() "{Downloads.PUBLIC}",
return "{Downloads.PUBLIC}";
},
/** /**
* Work on downloads that were started from a private browsing window. * Work on downloads that were started from a private browsing window.
*/ */
get PRIVATE() { get PRIVATE() "{Downloads.PRIVATE}",
return "{Downloads.PRIVATE}";
},
/** /**
* Work on both Downloads.PRIVATE and Downloads.PUBLIC downloads. * Work on both Downloads.PRIVATE and Downloads.PUBLIC downloads.
*/ */
get ALL() { get ALL() "{Downloads.ALL}",
return "{Downloads.ALL}";
},
/** /**
* Creates a new Download object. * Creates a new Download object.

View File

@ -1247,12 +1247,8 @@ var DirectoryIterator = function DirectoryIterator(path, options) {
this._isClosed = false; this._isClosed = false;
}; };
DirectoryIterator.prototype = { DirectoryIterator.prototype = {
iterator: function () { iterator: function () this,
return this; __iterator__: function () this,
},
__iterator__: function () {
return this;
},
// Once close() is called, _itmsg should reject with a // Once close() is called, _itmsg should reject with a
// StopIteration. However, we don't want to create the promise until // StopIteration. However, we don't want to create the promise until

View File

@ -955,7 +955,7 @@ var LoginManagerContent = {
// password if we find a matching login. // password if we find a matching login.
var username = usernameField.value.toLowerCase(); var username = usernameField.value.toLowerCase();
let matchingLogins = logins.filter(l => let matchingLogins = logins.filter(function(l)
l.username.toLowerCase() == username); l.username.toLowerCase() == username);
if (matchingLogins.length == 0) { if (matchingLogins.length == 0) {
log("Password not filled. None of the stored logins match the username already present."); log("Password not filled. None of the stored logins match the username already present.");
@ -982,9 +982,9 @@ var LoginManagerContent = {
// (user+pass or pass-only) when there's exactly one that matches. // (user+pass or pass-only) when there's exactly one that matches.
let matchingLogins; let matchingLogins;
if (usernameField) if (usernameField)
matchingLogins = logins.filter(l => l.username); matchingLogins = logins.filter(function(l) l.username);
else else
matchingLogins = logins.filter(l => !l.username); matchingLogins = logins.filter(function(l) !l.username);
if (matchingLogins.length != 1) { if (matchingLogins.length != 1) {
log("Multiple logins for form, so not filling any."); log("Multiple logins for form, so not filling any.");

View File

@ -281,10 +281,7 @@ LoginStore.prototype = {
/** /**
* Called when the data changed, this triggers asynchronous serialization. * Called when the data changed, this triggers asynchronous serialization.
*/ */
saveSoon: function () saveSoon: function () this._saver.arm(),
{
return this._saver.arm();
},
/** /**
* DeferredTask that handles the save operation. * DeferredTask that handles the save operation.

View File

@ -313,7 +313,7 @@ function SignonMatchesFilter(aSignon, aFilterValue) {
function FilterPasswords(aFilterValue, view) { function FilterPasswords(aFilterValue, view) {
aFilterValue = aFilterValue.toLowerCase(); aFilterValue = aFilterValue.toLowerCase();
return signons.filter(s => SignonMatchesFilter(s, aFilterValue)); return signons.filter(function (s) SignonMatchesFilter(s, aFilterValue));
} }
function SignonSaveState() { function SignonSaveState() {

View File

@ -298,7 +298,7 @@ LoginManager.prototype = {
var logins = this.findLogins({}, login.hostname, login.formSubmitURL, var logins = this.findLogins({}, login.hostname, login.formSubmitURL,
login.httpRealm); login.httpRealm);
if (logins.some(l => login.matches(l, true))) if (logins.some(function(l) login.matches(l, true)))
throw new Error("This login already exists."); throw new Error("This login already exists.");
log("Adding login"); log("Adding login");

View File

@ -1333,7 +1333,7 @@ LoginManagerPrompter.prototype = {
promptToChangePasswordWithUsernames : function (logins, count, aNewLogin) { promptToChangePasswordWithUsernames : function (logins, count, aNewLogin) {
const buttonFlags = Ci.nsIPrompt.STD_YES_NO_BUTTONS; const buttonFlags = Ci.nsIPrompt.STD_YES_NO_BUTTONS;
var usernames = logins.map(l => l.username); var usernames = logins.map(function (l) l.username);
var dialogText = this._getLocalizedString("userSelectText"); var dialogText = this._getLocalizedString("userSelectText");
var dialogTitle = this._getLocalizedString("passwordChangeTitle"); var dialogTitle = this._getLocalizedString("passwordChangeTitle");
var selectedIndex = { value: null }; var selectedIndex = { value: null };

View File

@ -501,7 +501,7 @@ LoginManagerStorage_mozStorage.prototype = {
// Build query // Build query
let query = "SELECT * FROM moz_logins"; let query = "SELECT * FROM moz_logins";
if (conditions.length) { if (conditions.length) {
conditions = conditions.map(c => "(" + c + ")"); conditions = conditions.map(function(c) "(" + c + ")");
query += " WHERE " + conditions.join(" AND "); query += " WHERE " + conditions.join(" AND ");
} }
@ -713,7 +713,7 @@ LoginManagerStorage_mozStorage.prototype = {
let query = "SELECT COUNT(1) AS numLogins FROM moz_logins"; let query = "SELECT COUNT(1) AS numLogins FROM moz_logins";
if (conditions.length) { if (conditions.length) {
conditions = conditions.map(c => "(" + c + ")"); conditions = conditions.map(function(c) "(" + c + ")");
query += " WHERE " + conditions.join(" AND "); query += " WHERE " + conditions.join(" AND ");
} }

View File

@ -91,9 +91,7 @@ this.PlacesBackups = {
* 3: contents hash * 3: contents hash
* 4: file extension * 4: file extension
*/ */
get filenamesRegex() { get filenamesRegex() filenamesRegex,
return filenamesRegex;
},
get folder() { get folder() {
Deprecated.warning( Deprecated.warning(
@ -135,9 +133,7 @@ this.PlacesBackups = {
}.bind(this)); }.bind(this));
}, },
get profileRelativeFolderPath() { get profileRelativeFolderPath() "bookmarkbackups",
return "bookmarkbackups";
},
/** /**
* Cache current backups in a sorted (by date DESC) array. * Cache current backups in a sorted (by date DESC) array.

View File

@ -188,9 +188,8 @@ this.PlacesDBUtils = {
* @param [optional] aTasks * @param [optional] aTasks
* Tasks object to execute. * Tasks object to execute.
*/ */
_checkIntegritySkipReindex: function PDBU__checkIntegritySkipReindex(aTasks) { _checkIntegritySkipReindex: function PDBU__checkIntegritySkipReindex(aTasks)
return this.checkIntegrity(aTasks, true); this.checkIntegrity(aTasks, true),
},
/** /**
* Checks integrity and tries to fix the database through a reindex. * Checks integrity and tries to fix the database through a reindex.
@ -278,7 +277,7 @@ this.PlacesDBUtils = {
PlacesDBUtils._executeTasks(tasks); PlacesDBUtils._executeTasks(tasks);
} }
}); });
stmts.forEach(aStmt => aStmt.finalize()); stmts.forEach(function (aStmt) aStmt.finalize());
}, },
_getBoundCoherenceStatements: function PDBU__getBoundCoherenceStatements() _getBoundCoherenceStatements: function PDBU__getBoundCoherenceStatements()
@ -1121,10 +1120,7 @@ Tasks.prototype = {
* *
* @return next task or undefined if no task is left. * @return next task or undefined if no task is left.
*/ */
pop: function T_pop() pop: function T_pop() this._list.shift(),
{
return this._list.shift();
},
/** /**
* Removes all tasks. * Removes all tasks.
@ -1137,10 +1133,7 @@ Tasks.prototype = {
/** /**
* Returns array of tasks ordered from the next to be run to the latest. * Returns array of tasks ordered from the next to be run to the latest.
*/ */
get list() get list() this._list.slice(0, this._list.length),
{
return this._list.slice(0, this._list.length);
},
/** /**
* Adds a message to the log. * Adds a message to the log.
@ -1156,8 +1149,5 @@ Tasks.prototype = {
/** /**
* Returns array of log messages ordered from oldest to newest. * Returns array of log messages ordered from oldest to newest.
*/ */
get messages() get messages() this._log.slice(0, this._log.length),
{
return this._log.slice(0, this._log.length);
},
} }

View File

@ -196,9 +196,7 @@ TransactionsHistory.__proto__ = {
// The index of the first undo entry (if any) - See the documentation // The index of the first undo entry (if any) - See the documentation
// at the top of this file. // at the top of this file.
_undoPosition: 0, _undoPosition: 0,
get undoPosition() { get undoPosition() this._undoPosition,
return this._undoPosition;
},
// Handy shortcuts // Handy shortcuts
get topUndoEntry() { get topUndoEntry() {

View File

@ -71,12 +71,8 @@ function QI_node(aNode, aIID) {
} }
return result; return result;
} }
function asContainer(aNode) { function asContainer(aNode) QI_node(aNode, Ci.nsINavHistoryContainerResultNode);
return QI_node(aNode, Ci.nsINavHistoryContainerResultNode); function asQuery(aNode) QI_node(aNode, Ci.nsINavHistoryQueryResultNode);
}
function asQuery(aNode) {
return QI_node(aNode, Ci.nsINavHistoryQueryResultNode);
}
/** /**
* Sends a bookmarks notification through the given observers. * Sends a bookmarks notification through the given observers.
@ -245,8 +241,8 @@ this.PlacesUtils = {
TOPIC_BOOKMARKS_RESTORE_SUCCESS: "bookmarks-restore-success", TOPIC_BOOKMARKS_RESTORE_SUCCESS: "bookmarks-restore-success",
TOPIC_BOOKMARKS_RESTORE_FAILED: "bookmarks-restore-failed", TOPIC_BOOKMARKS_RESTORE_FAILED: "bookmarks-restore-failed",
asContainer: aNode => asContainer(aNode), asContainer: function(aNode) asContainer(aNode),
asQuery: aNode => asQuery(aNode), asQuery: function(aNode) asQuery(aNode),
endl: NEWLINE, endl: NEWLINE,
@ -2543,61 +2539,45 @@ function TransactionItemCache()
} }
TransactionItemCache.prototype = { TransactionItemCache.prototype = {
set id(v) { set id(v)
this._id = (parseInt(v) > 0 ? v : null); this._id = (parseInt(v) > 0 ? v : null),
}, get id()
get id() { this._id || -1,
return this._id || -1; set parentId(v)
}, this._parentId = (parseInt(v) > 0 ? v : null),
set parentId(v) { get parentId()
this._parentId = (parseInt(v) > 0 ? v : null); this._parentId || -1,
},
get parentId() {
return this._parentId || -1;
},
keyword: null, keyword: null,
title: null, title: null,
dateAdded: null, dateAdded: null,
lastModified: null, lastModified: null,
postData: null, postData: null,
itemType: null, itemType: null,
set uri(v) { set uri(v)
this._uri = (v instanceof Ci.nsIURI ? v.clone() : null); this._uri = (v instanceof Ci.nsIURI ? v.clone() : null),
}, get uri()
get uri() { this._uri || null,
return this._uri || null; set feedURI(v)
}, this._feedURI = (v instanceof Ci.nsIURI ? v.clone() : null),
set feedURI(v) { get feedURI()
this._feedURI = (v instanceof Ci.nsIURI ? v.clone() : null); this._feedURI || null,
}, set siteURI(v)
get feedURI() { this._siteURI = (v instanceof Ci.nsIURI ? v.clone() : null),
return this._feedURI || null; get siteURI()
}, this._siteURI || null,
set siteURI(v) { set index(v)
this._siteURI = (v instanceof Ci.nsIURI ? v.clone() : null); this._index = (parseInt(v) >= 0 ? v : null),
},
get siteURI() {
return this._siteURI || null;
},
set index(v) {
this._index = (parseInt(v) >= 0 ? v : null);
},
// Index can be 0. // Index can be 0.
get index() { get index()
return this._index != null ? this._index : PlacesUtils.bookmarks.DEFAULT_INDEX; this._index != null ? this._index : PlacesUtils.bookmarks.DEFAULT_INDEX,
}, set annotations(v)
set annotations(v) { this._annotations = Array.isArray(v) ? Cu.cloneInto(v, {}) : null,
this._annotations = Array.isArray(v) ? Cu.cloneInto(v, {}) : null; get annotations()
}, this._annotations || null,
get annotations() { set tags(v)
return this._annotations || null; this._tags = (v && Array.isArray(v) ? Array.slice(v) : null),
}, get tags()
set tags(v) { this._tags || null,
this._tags = (v && Array.isArray(v) ? Array.slice(v) : null);
},
get tags() {
return this._tags || null;
},
}; };
@ -2612,23 +2592,15 @@ function BaseTransaction()
BaseTransaction.prototype = { BaseTransaction.prototype = {
name: null, name: null,
set childTransactions(v) { set childTransactions(v)
this._childTransactions = (Array.isArray(v) ? Array.slice(v) : null); this._childTransactions = (Array.isArray(v) ? Array.slice(v) : null),
}, get childTransactions()
get childTransactions() { this._childTransactions || null,
return this._childTransactions || null;
},
doTransaction: function BTXN_doTransaction() {}, doTransaction: function BTXN_doTransaction() {},
redoTransaction: function BTXN_redoTransaction() { redoTransaction: function BTXN_redoTransaction() this.doTransaction(),
return this.doTransaction();
},
undoTransaction: function BTXN_undoTransaction() {}, undoTransaction: function BTXN_undoTransaction() {},
merge: function BTXN_merge() { merge: function BTXN_merge() false,
return false; get isTransient() false,
},
get isTransient() {
return false;
},
QueryInterface: XPCOMUtils.generateQI([ QueryInterface: XPCOMUtils.generateQI([
Ci.nsITransaction Ci.nsITransaction
]), ]),

View File

@ -506,9 +506,8 @@ XPCOMUtils.defineLazyGetter(this, "Prefs", () => {
* The text to unescape and modify. * The text to unescape and modify.
* @return the modified spec. * @return the modified spec.
*/ */
function fixupSearchText(spec) { function fixupSearchText(spec)
return textURIService.unEscapeURIForUI("UTF-8", stripPrefix(spec)); textURIService.unEscapeURIForUI("UTF-8", stripPrefix(spec));
}
/** /**
* Generates the tokens used in searching from a given string. * Generates the tokens used in searching from a given string.
@ -520,9 +519,8 @@ function fixupSearchText(spec) {
* empty string. We don't want that, as it'll break our logic, so return * empty string. We don't want that, as it'll break our logic, so return
* an empty array then. * an empty array then.
*/ */
function getUnfilteredSearchTokens(searchString) { function getUnfilteredSearchTokens(searchString)
return searchString.length ? searchString.split(REGEXP_SPACES) : []; searchString.length ? searchString.split(REGEXP_SPACES) : [];
}
/** /**
* Strip prefixes from the URI that we don't care about for searching. * Strip prefixes from the URI that we don't care about for searching.
@ -1574,20 +1572,18 @@ Search.prototype = {
* @return an array consisting of the correctly optimized query to search the * @return an array consisting of the correctly optimized query to search the
* database with and an object containing the params to bound. * database with and an object containing the params to bound.
*/ */
get _switchToTabQuery() { get _switchToTabQuery() [
return [ SQL_SWITCHTAB_QUERY,
SQL_SWITCHTAB_QUERY, {
{ query_type: QUERYTYPE_FILTERED,
query_type: QUERYTYPE_FILTERED, matchBehavior: this._matchBehavior,
matchBehavior: this._matchBehavior, searchBehavior: this._behavior,
searchBehavior: this._behavior, // We only want to search the tokens that we are left with - not the
// We only want to search the tokens that we are left with - not the // original search string.
// original search string. searchString: this._searchTokens.join(" "),
searchString: this._searchTokens.join(" "), maxResults: Prefs.maxRichResults
maxResults: Prefs.maxRichResults }
} ],
];
},
/** /**
* Obtains the query to search for adaptive results. * Obtains the query to search for adaptive results.
@ -1595,18 +1591,16 @@ Search.prototype = {
* @return an array consisting of the correctly optimized query to search the * @return an array consisting of the correctly optimized query to search the
* database with and an object containing the params to bound. * database with and an object containing the params to bound.
*/ */
get _adaptiveQuery() { get _adaptiveQuery() [
return [ SQL_ADAPTIVE_QUERY,
SQL_ADAPTIVE_QUERY, {
{ parent: PlacesUtils.tagsFolderId,
parent: PlacesUtils.tagsFolderId, search_string: this._searchString,
search_string: this._searchString, query_type: QUERYTYPE_FILTERED,
query_type: QUERYTYPE_FILTERED, matchBehavior: this._matchBehavior,
matchBehavior: this._matchBehavior, searchBehavior: this._behavior
searchBehavior: this._behavior }
} ],
];
},
/** /**
* Whether we should try to autoFill. * Whether we should try to autoFill.

View File

@ -453,9 +453,7 @@ function Livemark(aLivemarkInfo)
} }
Livemark.prototype = { Livemark.prototype = {
get status() { get status() this._status,
return this._status;
},
set status(val) { set status(val) {
if (this._status != val) { if (this._status != val) {
this._status = val; this._status = val;
@ -555,9 +553,7 @@ Livemark.prototype = {
this.updateChildren(aForceUpdate); this.updateChildren(aForceUpdate);
}, },
get children() { get children() this._children,
return this._children;
},
set children(val) { set children(val) {
this._children = val; this._children = val;
@ -595,48 +591,23 @@ Livemark.prototype = {
// The QueryInterface is needed cause aContainerNode is a jsval. // The QueryInterface is needed cause aContainerNode is a jsval.
// This is required to avoid issues with scriptable wrappers that would // This is required to avoid issues with scriptable wrappers that would
// not allow the view to correctly set expandos. // not allow the view to correctly set expandos.
get parent() { get parent()
return aContainerNode.QueryInterface(Ci.nsINavHistoryContainerResultNode); aContainerNode.QueryInterface(Ci.nsINavHistoryContainerResultNode),
}, get parentResult() this.parent.parentResult,
get parentResult() { get uri() localChild.uri.spec,
return this.parent.parentResult; get type() Ci.nsINavHistoryResultNode.RESULT_TYPE_URI,
}, get title() localChild.title,
get uri() { get accessCount()
return localChild.uri.spec; Number(livemark._isURIVisited(NetUtil.newURI(this.uri))),
}, get time() 0,
get type() { get icon() "",
return Ci.nsINavHistoryResultNode.RESULT_TYPE_URI; get indentLevel() this.parent.indentLevel + 1,
}, get bookmarkIndex() -1,
get title() { get itemId() -1,
return localChild.title; get dateAdded() now,
}, get lastModified() now,
get accessCount() { get tags()
return Number(livemark._isURIVisited(NetUtil.newURI(this.uri))); PlacesUtils.tagging.getTagsForURI(NetUtil.newURI(this.uri)).join(", "),
},
get time() {
return 0;
},
get icon() {
return "";
},
get indentLevel() {
return this.parent.indentLevel + 1;
},
get bookmarkIndex() {
return -1;
},
get itemId() {
return -1;
},
get dateAdded() {
return now;
},
get lastModified() {
return now;
},
get tags() {
return PlacesUtils.tagging.getTagsForURI(NetUtil.newURI(this.uri)).join(", ");
},
QueryInterface: XPCOMUtils.generateQI([Ci.nsINavHistoryResultNode]) QueryInterface: XPCOMUtils.generateQI([Ci.nsINavHistoryResultNode])
}; };
nodes.push(node); nodes.push(node);

View File

@ -721,9 +721,8 @@ nsPlacesAutoComplete.prototype = {
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//// nsPlacesAutoComplete //// nsPlacesAutoComplete
get _databaseInitialized() { get _databaseInitialized()
return Object.getOwnPropertyDescriptor(this, "_db").value !== undefined; Object.getOwnPropertyDescriptor(this, "_db").value !== undefined,
},
/** /**
* Generates the tokens used in searching from a given string. * Generates the tokens used in searching from a given string.

View File

@ -721,9 +721,7 @@ nsPlacesExpiration.prototype = {
} }
return aNewStatus; return aNewStatus;
}, },
get status() { get status() this._status,
return this._status;
},
_isIdleObserver: false, _isIdleObserver: false,
_expireOnIdle: false, _expireOnIdle: false,
@ -748,9 +746,7 @@ nsPlacesExpiration.prototype = {
this._expireOnIdle = aExpireOnIdle; this._expireOnIdle = aExpireOnIdle;
return this._expireOnIdle; return this._expireOnIdle;
}, },
get expireOnIdle() { get expireOnIdle() this._expireOnIdle,
return this._expireOnIdle;
},
_loadPrefs: function PEX__loadPrefs() { _loadPrefs: function PEX__loadPrefs() {
// Get the user's limit, if it was set. // Get the user's limit, if it was set.

View File

@ -522,9 +522,7 @@ TagAutoCompleteResult.prototype = {
return this._results.length; return this._results.length;
}, },
get typeAheadResult() { get typeAheadResult() false,
return false;
},
/** /**
* Get the value of the result at the given index * Get the value of the result at the given index

View File

@ -141,7 +141,7 @@ CommonDialog.prototype = {
// set the icon // set the icon
let icon = this.ui.infoIcon; let icon = this.ui.infoIcon;
if (icon) if (icon)
this.iconClass.forEach((el,idx,arr) => icon.classList.add(el)); this.iconClass.forEach(function(el,idx,arr) icon.classList.add(el));
// set default result to cancelled // set default result to cancelled
this.args.ok = false; this.args.ok = false;

View File

@ -56,9 +56,7 @@ var AutoCompleteE10SView = {
getColumnProperties: function(column) { return ""; }, getColumnProperties: function(column) { return ""; },
// nsIAutoCompleteController // nsIAutoCompleteController
get matchCount() { get matchCount() this.rowCount,
return this.rowCount;
},
handleEnter: function(aIsPopupSelection) { handleEnter: function(aIsPopupSelection) {
AutoCompleteE10S.handleEnter(aIsPopupSelection); AutoCompleteE10S.handleEnter(aIsPopupSelection);

View File

@ -601,7 +601,7 @@ function dbClose(aShutdown) {
dbStmts = new Map(); dbStmts = new Map();
let closed = false; let closed = false;
_dbConnection.asyncClose(() => closed = true); _dbConnection.asyncClose(function () closed = true);
if (!aShutdown) { if (!aShutdown) {
let thread = Services.tm.currentThread; let thread = Services.tm.currentThread;
@ -773,9 +773,7 @@ function expireOldEntriesVacuum(aExpireTime, aBeginningCount) {
} }
this.FormHistory = { this.FormHistory = {
get enabled() { get enabled() Prefs.enabled,
return Prefs.enabled;
},
search : function formHistorySearch(aSelectTerms, aSearchData, aCallbacks) { search : function formHistorySearch(aSelectTerms, aSearchData, aCallbacks) {
// if no terms selected, select everything // if no terms selected, select everything

View File

@ -242,7 +242,7 @@ FormAutoComplete.prototype = {
let entry = entries[i]; let entry = entries[i];
// Remove results that do not contain the token // Remove results that do not contain the token
// XXX bug 394604 -- .toLowerCase can be wrong for some intl chars // XXX bug 394604 -- .toLowerCase can be wrong for some intl chars
if(searchTokens.some(tok => entry.textLowerCase.indexOf(tok) < 0)) if(searchTokens.some(function (tok) entry.textLowerCase.indexOf(tok) < 0))
continue; continue;
this._calculateScore(entry, searchString, searchTokens); this._calculateScore(entry, searchString, searchTokens);
this.log("Reusing autocomplete entry '" + entry.text + this.log("Reusing autocomplete entry '" + entry.text +

View File

@ -1013,9 +1013,8 @@ function sanitizeName(aName) {
* @param prefName * @param prefName
* The name of the pref. * The name of the pref.
**/ **/
function getMozParamPref(prefName) { function getMozParamPref(prefName)
return Services.prefs.getCharPref(BROWSER_SEARCH_PREF + "param." + prefName); Services.prefs.getCharPref(BROWSER_SEARCH_PREF + "param." + prefName);
}
/** /**
* Notifies watchers of SEARCH_ENGINE_TOPIC about changes to an engine or to * Notifies watchers of SEARCH_ENGINE_TOPIC about changes to an engine or to
@ -1242,9 +1241,8 @@ EngineURL.prototype = {
return queryParam ? queryParam.name : ""; return queryParam ? queryParam.name : "";
}, },
_hasRelation: function SRC_EURL__hasRelation(aRel) { _hasRelation: function SRC_EURL__hasRelation(aRel)
return this.rels.some(e => e == aRel.toLowerCase()); this.rels.some(function(e) e == aRel.toLowerCase()),
},
_initWithJSON: function SRC_EURL__initWithJSON(aJson, aEngine) { _initWithJSON: function SRC_EURL__initWithJSON(aJson, aEngine) {
if (!aJson.params) if (!aJson.params)
@ -1287,9 +1285,8 @@ EngineURL.prototype = {
if (this.method != "GET") if (this.method != "GET")
json.method = this.method; json.method = this.method;
function collapseMozParams(aParam) { function collapseMozParams(aParam)
return this.mozparams[aParam.name] || aParam; this.mozparams[aParam.name] || aParam;
}
json.params = this.params.map(collapseMozParams, this); json.params = this.params.map(collapseMozParams, this);
return json; return json;
@ -3197,12 +3194,10 @@ SearchService.prototype = {
cache.directories[aDir.path].lastModifiedTime != aDir.lastModifiedTime); cache.directories[aDir.path].lastModifiedTime != aDir.lastModifiedTime);
} }
function notInCachePath(aPathToLoad) { function notInCachePath(aPathToLoad)
return cachePaths.indexOf(aPathToLoad.path) == -1; cachePaths.indexOf(aPathToLoad.path) == -1;
} function notInCacheVisibleEngines(aEngineName)
function notInCacheVisibleEngines(aEngineName) { cache.visibleDefaultEngines.indexOf(aEngineName) == -1;
return cache.visibleDefaultEngines.indexOf(aEngineName) == -1;
}
let buildID = Services.appinfo.platformBuildID; let buildID = Services.appinfo.platformBuildID;
let cachePaths = [path for (path in cache.directories)]; let cachePaths = [path for (path in cache.directories)];
@ -3321,12 +3316,10 @@ SearchService.prototype = {
}); });
} }
function notInCachePath(aPathToLoad) { function notInCachePath(aPathToLoad)
return cachePaths.indexOf(aPathToLoad.path) == -1; cachePaths.indexOf(aPathToLoad.path) == -1;
} function notInCacheVisibleEngines(aEngineName)
function notInCacheVisibleEngines(aEngineName) { cache.visibleDefaultEngines.indexOf(aEngineName) == -1;
return cache.visibleDefaultEngines.indexOf(aEngineName) == -1;
}
let buildID = Services.appinfo.platformBuildID; let buildID = Services.appinfo.platformBuildID;
let cachePaths = [path for (path in cache.directories)]; let cachePaths = [path for (path in cache.directories)];
@ -3755,7 +3748,7 @@ SearchService.prototype = {
_parseListTxt: function SRCH_SVC_parseListTxt(list, jarPackaging, _parseListTxt: function SRCH_SVC_parseListTxt(list, jarPackaging,
chromeFiles, uris) { chromeFiles, uris) {
let names = list.split("\n").filter(n => !!n); let names = list.split("\n").filter(function (n) !!n);
// This maps the names of our built-in engines to a boolean // This maps the names of our built-in engines to a boolean
// indicating whether it should be hidden by default. // indicating whether it should be hidden by default.
let jarNames = new Map(); let jarNames = new Map();
@ -4920,10 +4913,8 @@ var engineMetadataService = {
/** /**
* Flush any waiting write. * Flush any waiting write.
*/ */
finalize: function () { finalize: function () this._lazyWriter ? this._lazyWriter.finalize()
return this._lazyWriter ? this._lazyWriter.finalize() : Promise.resolve(),
: Promise.resolve();
},
/** /**
* Commit changes to disk, asynchronously. * Commit changes to disk, asynchronously.

View File

@ -28,9 +28,7 @@ AbstractPort.prototype = {
return "MessagePort(portType='" + this._portType + "', portId=" return "MessagePort(portType='" + this._portType + "', portId="
+ this._portid + (this._closed ? ", closed=true" : "") + ")"; + this._portid + (this._closed ? ", closed=true" : "") + ")";
}, },
_JSONParse: function fw_AbstractPort_JSONParse(data) { _JSONParse: function fw_AbstractPort_JSONParse(data) JSON.parse(data),
return JSON.parse(data);
},
_postControlMessage: function fw_AbstractPort_postControlMessage(topic, data) { _postControlMessage: function fw_AbstractPort_postControlMessage(topic, data) {
let postData = { let postData = {

View File

@ -34,9 +34,7 @@ XPCOMUtils.defineLazyServiceGetter(this, "etld",
// Internal helper methods and state // Internal helper methods and state
var SocialServiceInternal = { var SocialServiceInternal = {
get enabled() { get enabled() this.providerArray.length > 0,
return this.providerArray.length > 0;
},
get providerArray() { get providerArray() {
return [p for ([, p] of Iterator(this.providers))]; return [p for ([, p] of Iterator(this.providers))];
@ -124,7 +122,7 @@ var SocialServiceInternal = {
// all enabled providers get sorted even with frecency zero. // all enabled providers get sorted even with frecency zero.
let providerList = SocialServiceInternal.providerArray; let providerList = SocialServiceInternal.providerArray;
// reverse sort // reverse sort
aCallback(providerList.sort((a, b) => b.frecency - a.frecency)); aCallback(providerList.sort(function(a, b) b.frecency - a.frecency));
} }
}); });
} finally { } finally {

View File

@ -115,23 +115,17 @@ this.PageThumbs = {
/** /**
* The scheme to use for thumbnail urls. * The scheme to use for thumbnail urls.
*/ */
get scheme() { get scheme() "moz-page-thumb",
return "moz-page-thumb";
},
/** /**
* The static host to use for thumbnail urls. * The static host to use for thumbnail urls.
*/ */
get staticHost() { get staticHost() "thumbnail",
return "thumbnail";
},
/** /**
* The thumbnails' image type. * The thumbnails' image type.
*/ */
get contentType() { get contentType() "image/png",
return "image/png";
},
init: function PageThumbs_init() { init: function PageThumbs_init() {
if (!this._initialized) { if (!this._initialized) {

View File

@ -40,16 +40,12 @@ Protocol.prototype = {
/** /**
* The scheme used by this protocol. * The scheme used by this protocol.
*/ */
get scheme() { get scheme() PageThumbs.scheme,
return PageThumbs.scheme;
},
/** /**
* The default port for this protocol (we don't support ports). * The default port for this protocol (we don't support ports).
*/ */
get defaultPort() { get defaultPort() -1,
return -1;
},
/** /**
* The flags specific to this protocol implementation. * The flags specific to this protocol implementation.
@ -96,7 +92,7 @@ Protocol.prototype = {
* Decides whether to allow a blacklisted port. * Decides whether to allow a blacklisted port.
* @return Always false, we'll never allow ports. * @return Always false, we'll never allow ports.
*/ */
allowPort: () => false, allowPort: function () false,
classID: Components.ID("{5a4ae9b5-f475-48ae-9dce-0b4c1d347884}"), classID: Components.ID("{5a4ae9b5-f475-48ae-9dce-0b4c1d347884}"),
QueryInterface: XPCOMUtils.generateQI([Ci.nsIProtocolHandler]) QueryInterface: XPCOMUtils.generateQI([Ci.nsIProtocolHandler])

View File

@ -87,9 +87,9 @@ nsURLFormatterService.prototype = {
QueryInterface: XPCOMUtils.generateQI([Ci.nsIURLFormatter]), QueryInterface: XPCOMUtils.generateQI([Ci.nsIURLFormatter]),
_defaults: { _defaults: {
LOCALE: () => Cc["@mozilla.org/chrome/chrome-registry;1"]. LOCALE: function() Cc["@mozilla.org/chrome/chrome-registry;1"].
getService(Ci.nsIXULChromeRegistry). getService(Ci.nsIXULChromeRegistry).
getSelectedLocale('global'), getSelectedLocale('global'),
REGION: function() { REGION: function() {
try { try {
// When the geoip lookup failed to identify the region, we fallback to // When the geoip lookup failed to identify the region, we fallback to
@ -99,27 +99,27 @@ nsURLFormatterService.prototype = {
return "ZZ"; return "ZZ";
} }
}, },
VENDOR: function() { return this.appInfo.vendor; }, VENDOR: function() this.appInfo.vendor,
NAME: function() { return this.appInfo.name; }, NAME: function() this.appInfo.name,
ID: function() { return this.appInfo.ID; }, ID: function() this.appInfo.ID,
VERSION: function() { return this.appInfo.version; }, VERSION: function() this.appInfo.version,
APPBUILDID: function() { return this.appInfo.appBuildID; }, APPBUILDID: function() this.appInfo.appBuildID,
PLATFORMVERSION: function() { return this.appInfo.platformVersion; }, PLATFORMVERSION: function() this.appInfo.platformVersion,
PLATFORMBUILDID: function() { return this.appInfo.platformBuildID; }, PLATFORMBUILDID: function() this.appInfo.platformBuildID,
APP: function() { return this.appInfo.name.toLowerCase().replace(/ /, ""); }, APP: function() this.appInfo.name.toLowerCase().replace(/ /, ""),
OS: function() { return this.appInfo.OS; }, OS: function() this.appInfo.OS,
XPCOMABI: function() { return this.ABI; }, XPCOMABI: function() this.ABI,
BUILD_TARGET: function() { return this.appInfo.OS + "_" + this.ABI; }, BUILD_TARGET: function() this.appInfo.OS + "_" + this.ABI,
OS_VERSION: function() { return this.OSVersion; }, OS_VERSION: function() this.OSVersion,
CHANNEL: () => UpdateUtils.UpdateChannel, CHANNEL: function() UpdateUtils.UpdateChannel,
MOZILLA_API_KEY: () => "@MOZ_MOZILLA_API_KEY@", MOZILLA_API_KEY: function() "@MOZ_MOZILLA_API_KEY@",
GOOGLE_API_KEY: () => "@MOZ_GOOGLE_API_KEY@", GOOGLE_API_KEY: function() "@MOZ_GOOGLE_API_KEY@",
GOOGLE_OAUTH_API_CLIENTID:() => "@MOZ_GOOGLE_OAUTH_API_CLIENTID@", GOOGLE_OAUTH_API_CLIENTID:function() "@MOZ_GOOGLE_OAUTH_API_CLIENTID@",
GOOGLE_OAUTH_API_KEY: () => "@MOZ_GOOGLE_OAUTH_API_KEY@", GOOGLE_OAUTH_API_KEY: function() "@MOZ_GOOGLE_OAUTH_API_KEY@",
BING_API_CLIENTID:() => "@MOZ_BING_API_CLIENTID@", BING_API_CLIENTID:function() "@MOZ_BING_API_CLIENTID@",
BING_API_KEY: () => "@MOZ_BING_API_KEY@", BING_API_KEY: function() "@MOZ_BING_API_KEY@",
DISTRIBUTION: function() { return this.distribution.id; }, DISTRIBUTION: function() this.distribution.id,
DISTRIBUTION_VERSION: function() { return this.distribution.version; } DISTRIBUTION_VERSION: function() this.distribution.version
}, },
formatURL: function uf_formatURL(aFormat) { formatURL: function uf_formatURL(aFormat) {