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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1247,12 +1247,8 @@ var DirectoryIterator = function DirectoryIterator(path, options) {
this._isClosed = false;
};
DirectoryIterator.prototype = {
iterator: function () {
return this;
},
__iterator__: function () {
return this;
},
iterator: function () this,
__iterator__: function () this,
// Once close() is called, _itmsg should reject with a
// 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.
var username = usernameField.value.toLowerCase();
let matchingLogins = logins.filter(l =>
let matchingLogins = logins.filter(function(l)
l.username.toLowerCase() == username);
if (matchingLogins.length == 0) {
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.
let matchingLogins;
if (usernameField)
matchingLogins = logins.filter(l => l.username);
matchingLogins = logins.filter(function(l) l.username);
else
matchingLogins = logins.filter(l => !l.username);
matchingLogins = logins.filter(function(l) !l.username);
if (matchingLogins.length != 1) {
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.
*/
saveSoon: function ()
{
return this._saver.arm();
},
saveSoon: function () this._saver.arm(),
/**
* DeferredTask that handles the save operation.

View File

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

View File

@ -298,7 +298,7 @@ LoginManager.prototype = {
var logins = this.findLogins({}, login.hostname, login.formSubmitURL,
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.");
log("Adding login");

View File

@ -1333,7 +1333,7 @@ LoginManagerPrompter.prototype = {
promptToChangePasswordWithUsernames : function (logins, count, aNewLogin) {
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 dialogTitle = this._getLocalizedString("passwordChangeTitle");
var selectedIndex = { value: null };

View File

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

View File

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

View File

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

View File

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

View File

@ -506,9 +506,8 @@ XPCOMUtils.defineLazyGetter(this, "Prefs", () => {
* The text to unescape and modify.
* @return the modified spec.
*/
function fixupSearchText(spec) {
return textURIService.unEscapeURIForUI("UTF-8", stripPrefix(spec));
}
function fixupSearchText(spec)
textURIService.unEscapeURIForUI("UTF-8", stripPrefix(spec));
/**
* 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
* an empty array then.
*/
function getUnfilteredSearchTokens(searchString) {
return searchString.length ? searchString.split(REGEXP_SPACES) : [];
}
function getUnfilteredSearchTokens(searchString)
searchString.length ? searchString.split(REGEXP_SPACES) : [];
/**
* Strip prefixes from the URI that we don't care about for searching.
@ -1574,8 +1572,7 @@ Search.prototype = {
* @return an array consisting of the correctly optimized query to search the
* database with and an object containing the params to bound.
*/
get _switchToTabQuery() {
return [
get _switchToTabQuery() [
SQL_SWITCHTAB_QUERY,
{
query_type: QUERYTYPE_FILTERED,
@ -1586,8 +1583,7 @@ Search.prototype = {
searchString: this._searchTokens.join(" "),
maxResults: Prefs.maxRichResults
}
];
},
],
/**
* Obtains the query to search for adaptive results.
@ -1595,8 +1591,7 @@ Search.prototype = {
* @return an array consisting of the correctly optimized query to search the
* database with and an object containing the params to bound.
*/
get _adaptiveQuery() {
return [
get _adaptiveQuery() [
SQL_ADAPTIVE_QUERY,
{
parent: PlacesUtils.tagsFolderId,
@ -1605,8 +1600,7 @@ Search.prototype = {
matchBehavior: this._matchBehavior,
searchBehavior: this._behavior
}
];
},
],
/**
* Whether we should try to autoFill.

View File

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

View File

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

View File

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

View File

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

View File

@ -141,7 +141,7 @@ CommonDialog.prototype = {
// set the icon
let icon = this.ui.infoIcon;
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
this.args.ok = false;

View File

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

View File

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

View File

@ -242,7 +242,7 @@ FormAutoComplete.prototype = {
let entry = entries[i];
// Remove results that do not contain the token
// 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;
this._calculateScore(entry, searchString, searchTokens);
this.log("Reusing autocomplete entry '" + entry.text +

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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