Bug 1292035 - Enable the space-before-blocks rule for eslint. This patch was generated using 'eslint --fix'. r=markh

MozReview-Commit-ID: 2XVoU05YvES

--HG--
extra : rebase_source : e7ed2d094c21b59dd59476b8930b75da2e6d6980
This commit is contained in:
Jared Wein 2016-08-04 03:20:25 -04:00
Родитель 85245516b8
Коммит 169d66a3ed
61 изменённых файлов: 324 добавлений и 324 удалений

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

@ -94,7 +94,7 @@ function promiseSetPassword(login) {
},
handleCompletion(aReason) {
if (aReason === Ci.mozIStorageStatementCallback.REASON_FINISHED){
if (aReason === Ci.mozIStorageStatementCallback.REASON_FINISHED) {
resolve();
} else {
reject("Query has failed: " + aReason);

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

@ -13,7 +13,7 @@ if (!cachedLeftPaneFolderIdGetter && typeof(getter) == "function") {
}
// ...And restore it when test ends.
registerCleanupFunction(function(){
registerCleanupFunction(function() {
let getter = PlacesUIUtils.__lookupGetter__("leftPaneFolderId");
if (cachedLeftPaneFolderIdGetter && typeof(getter) != "function") {
PlacesUIUtils.__defineGetter__("leftPaneFolderId", cachedLeftPaneFolderIdGetter);

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

@ -22,7 +22,7 @@ const ACTION_METHODS = [
add_task(function* testInitUninit() {
let store = new SyncedTabsListStore();
let ViewMock = sinon.stub();
let view = {render(){}, destroy(){}};
let view = {render() {}, destroy() {}};
ViewMock.returns(view);

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

@ -159,7 +159,7 @@ function validateTimestamp(eventName, timestamp) {
ok(Number.isFinite(timestamp), "Timestamp must be a number.");
}
add_task(function* test_setup(){
add_task(function* test_setup() {
yield setup_UITourTest();
requestLongerTimeout(2);
registerCleanupFunction(() => {

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

@ -50,7 +50,7 @@ function destroyHiddenBrowser(aFrame, aBrowser) {
* Test that UITour works when called when no tabs are available (e.g., when using windowless
* browsers).
*/
add_task(function* test_windowless_UITour(){
add_task(function* test_windowless_UITour() {
// Get the URL for the test page.
let pageURL = getRootDirectory(gTestPath) + "uitour.html";

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

@ -591,7 +591,7 @@ PKT_SAVED.prototype = {
$(function()
{
if(!window.thePKT_SAVED){
if(!window.thePKT_SAVED) {
var thePKT_SAVED = new PKT_SAVED();
window.thePKT_SAVED = thePKT_SAVED;
thePKT_SAVED.init();

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

@ -167,7 +167,7 @@ PKT_SIGNUP.prototype = {
$(function()
{
if(!window.thePKT_SIGNUP){
if(!window.thePKT_SIGNUP) {
var thePKT_SIGNUP = new PKT_SIGNUP();
window.thePKT_SIGNUP = thePKT_SIGNUP;
thePKT_SIGNUP.init();

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

@ -90,7 +90,7 @@ var pktApi = (function() {
return out;
}
var parseJSON = function(jsonString){
var parseJSON = function(jsonString) {
try {
var o = JSON.parse(jsonString);
@ -261,7 +261,7 @@ var pktApi = (function() {
var request = Components.classes["@mozilla.org/xmlextras/xmlhttprequest;1"].createInstance(Components.interfaces.nsIXMLHttpRequest);
request.open("POST", url, true);
request.onreadystatechange = function(e){
request.onreadystatechange = function(e) {
if (request.readyState == 4) {
if (request.status === 200) {
// There could still be an error if the response is no valid json

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

@ -95,7 +95,7 @@ this.TestRunner = {
yield BrowserTestUtils.loadURI(selectedBrowser, HOME_PAGE);
yield BrowserTestUtils.browserLoaded(selectedBrowser);
for (let i = 0; i < this.combos.length; i++){
for (let i = 0; i < this.combos.length; i++) {
this.currentComboIndex = i;
yield this._performCombo(this.combos.item(this.currentComboIndex));
}

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

@ -42,7 +42,7 @@ this.Preferences = {
configurations: {
"panePrivacy-DNTDialog": {
applyConfig: Task.async(function*(){
applyConfig: Task.async(function*() {
let browserWindow = Services.wm.getMostRecentWindow("navigator:browser");
yield prefHelper("panePrivacy", null);

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

@ -167,7 +167,7 @@
// "semi": [2, "always"],
// Require space before blocks
// "space-before-blocks": 2,
"space-before-blocks": 2,
// Never use spaces before function parentheses
// "space-before-function-paren": [2, { "anonymous": "always", "named": "never" }],

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

@ -544,7 +544,7 @@ var RemoteAddonsChild = {
init: function(global) {
if (!this._ready) {
if (!Services.cpmm.initialProcessData.remoteAddonsParentInitted){
if (!Services.cpmm.initialProcessData.remoteAddonsParentInitted) {
return null;
}

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

@ -40,7 +40,7 @@ function test_portal_not_found() {
do_check_eq(++step, 2);
do_check_true(success);
do_check_eq(attempt, 1);
gServer.stop(function(){dump('server stop\n'); do_test_finished(); });
gServer.stop(function() {dump('server stop\n'); do_test_finished(); });
}
};

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

@ -228,7 +228,7 @@ ContentPrefService.prototype = {
if (this._privModeStorage.has(group, aName)) {
let value = this._privModeStorage.get(group, aName);
if (aCallback) {
this._scheduleCallback(function(){aCallback.onResult(value);});
this._scheduleCallback(function() {aCallback.onResult(value);});
return undefined;
}
return value;
@ -597,7 +597,7 @@ ContentPrefService.prototype = {
if (this._cache.has(aGroup, aSetting)) {
value = this._cache.get(aGroup, aSetting);
if (aCallback) {
this._scheduleCallback(function(){aCallback.onResult(value);});
this._scheduleCallback(function() {aCallback.onResult(value);});
return undefined;
}
return value;
@ -647,7 +647,7 @@ ContentPrefService.prototype = {
if (this._cache.has(null, aName)) {
value = this._cache.get(null, aName);
if (aCallback) {
this._scheduleCallback(function(){aCallback.onResult(value);});
this._scheduleCallback(function() {aCallback.onResult(value);});
return undefined;
}
return value;

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

@ -2706,7 +2706,7 @@ function run_variadic_tests(library) {
do_check_throws(function() {
// No variadic closure callbacks allowed.
sum_va_type(function(){});
sum_va_type(function() {});
}, Error);
let count_true_va = library.declare("test_sum_va_cdecl", ctypes.default_abi, ctypes.uint8_t,

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

@ -105,7 +105,7 @@ Events.prototype = {
dispatch: function evts_dispatch(aEvent, aEventItem) {
var eventItem = new EventItem(aEvent, aEventItem);
this._listeners.forEach(function(key){
this._listeners.forEach(function(key) {
if (key.event == aEvent) {
key.listener.handleEvent ?
key.listener.handleEvent(eventItem) :

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

@ -70,7 +70,7 @@ function iterateDir(dir, recurse, callback) {
}
}
function isIID(a, iid){
function isIID(a, iid) {
try {
a.QueryInterface(iid);
return true;

Разница между файлами не показана из-за своего большого размера Загрузить разницу

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

@ -43,15 +43,15 @@ var repo = 'glennjones/microformat-shiv',
getLastBuildState( repo, function( err, buildState){
if(buildState){
getLastBuildState( repo, function( err, buildState) {
if(buildState) {
console.log('last build state:', buildState);
if(buildState === 'passed'){
if(buildState === 'passed') {
console.log('downloading git repo', repo);
getLastCommitDate( repo, function( err, date){
if(date){
getLastCommitDate( repo, function( err, date) {
if(date) {
console.log( 'last commit:', new Date(date).toString() );
}
});
@ -71,11 +71,11 @@ getLastBuildState( repo, function( err, buildState){
* updates from directories and files from repo
*
*/
function updateFromRepo(){
download(repo, tempDir, function(err, data){
function updateFromRepo() {
download(repo, tempDir, function(err, data) {
// the err and data from download-github-repo give false negatives
if( fs.existsSync( tempDir ) ){
if( fs.existsSync( tempDir ) ) {
var version = getRepoVersion();
removeCurrentFiles( pathList, deployDirResolved );
@ -102,8 +102,8 @@ function updateFromRepo(){
* @param {Array} pathList
* @param {String} deployDirResolved
*/
function removeCurrentFiles( pathList, deployDirResolved ){
pathList.forEach( function( path ){
function removeCurrentFiles( pathList, deployDirResolved ) {
pathList.forEach( function( path ) {
console.log('removed:', deployDirResolved + path[1]);
fs.removeSync(deployDirResolved + path[1]);
});
@ -116,8 +116,8 @@ function removeCurrentFiles( pathList, deployDirResolved ){
* @param {Array} pathList
* @param {String} deployDirResolved
*/
function addNewFiles( pathList, deployDirResolved ){
pathList.forEach( function( path ){
function addNewFiles( pathList, deployDirResolved ) {
pathList.forEach( function( path ) {
console.log('added:', deployDirResolved + path[1]);
fs.copySync(tempDir + path[0], deployDirResolved + path[1]);
});
@ -130,11 +130,11 @@ function addNewFiles( pathList, deployDirResolved ){
*
* @return {String}
*/
function getRepoVersion(){
function getRepoVersion() {
var pack = fs.readFileSync(path.resolve(tempDir,'package.json'), {encoding: 'utf8'});
if(pack){
if(pack) {
pack = JSON.parse(pack)
if(pack && pack.version){
if(pack && pack.version) {
return pack.version;
}
}
@ -148,7 +148,7 @@ function getRepoVersion(){
* @param {String} repo
* @param {Function} callback
*/
function getLastCommitDate( repo, callback ){
function getLastCommitDate( repo, callback ) {
var options = {
url: 'https://api.github.com/repos/' + repo + '/commits?per_page=1',
@ -161,7 +161,7 @@ function getLastCommitDate( repo, callback ){
if (!error && response.statusCode == 200) {
var date = null,
json = JSON.parse(body);
if(json && json.length && json[0].commit && json[0].commit.author ){
if(json && json.length && json[0].commit && json[0].commit.author ) {
date = json[0].commit.author.date;
}
callback(null, date);
@ -179,7 +179,7 @@ function getLastCommitDate( repo, callback ){
* @param {String} repo
* @param {Function} callback
*/
function getLastBuildState( repo, callback ){
function getLastBuildState( repo, callback ) {
var options = {
url: 'https://api.travis-ci.org/repos/' + repo,
@ -193,7 +193,7 @@ function getLastBuildState( repo, callback ){
if (!error && response.statusCode == 200) {
var buildState = null,
json = JSON.parse(body);
if(json && json.repo && json.repo.last_build_state ){
if(json && json.repo && json.repo.last_build_state ) {
buildState = json.repo.last_build_state;
}
callback(null, buildState);
@ -211,8 +211,8 @@ function getLastBuildState( repo, callback ){
* @param {String} path
* @param {String} content
*/
function addExportedSymbol( path ){
if(path === '/microformat-shiv.js'){
function addExportedSymbol( path ) {
if(path === '/microformat-shiv.js') {
fs.appendFileSync(deployDirResolved + '/microformat-shiv.js', '\r\n' + exportedSymbol + '\r\n');
console.log('appended exported symbol to microformat-shiv.js');
}
@ -225,9 +225,9 @@ function addExportedSymbol( path ){
* @param {String} path
* @param {String} content
*/
function replaceInFile( path, findStr, replaceStr ){
readFile(deployDirResolved + path, function(err, fileStr){
if(fileStr){
function replaceInFile( path, findStr, replaceStr ) {
readFile(deployDirResolved + path, function(err, fileStr) {
if(fileStr) {
fileStr = fileStr.replace(findStr, replaceStr)
writeFile(deployDirResolved + path, fileStr);
console.log('replaced ' + findStr + ' with ' + replaceStr + ' in ' + path);
@ -244,7 +244,7 @@ function replaceInFile( path, findStr, replaceStr ){
* @param {String} path
* @param {String} content
*/
function writeFile(path, content){
function writeFile(path, content) {
fs.writeFile(path, content, 'utf8', function(err) {
if(err) {
console.log(err);
@ -261,6 +261,6 @@ function writeFile(path, content){
* @param {String} path
* @param {Function} callback
*/
function readFile(path, callback){
function readFile(path, callback) {
fs.readFile(path, 'utf8', callback);
}

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

@ -49,7 +49,7 @@ var LoginManagerContextMenu = {
let username = login.username;
// If login is empty or duplicated we want to append a modification date to it.
if (!username || duplicateUsernames.has(username)){
if (!username || duplicateUsernames.has(username)) {
if (!username) {
username = this._getLocalizedString("noUsername");
}

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

@ -15,11 +15,11 @@ function RejectsStartup() {
var rejectsTreeView = {
rowCount : 0,
setTree : function(tree){},
setTree : function(tree) {},
getImageSrc : function(row, column) {},
getProgressMode : function(row, column) {},
getCellValue : function(row, column) {},
getCellText : function(row, column){
getCellText : function(row, column) {
var rv="";
if (column.id=="rejectCol") {
rv = rejects[row].host;
@ -30,8 +30,8 @@ var rejectsTreeView = {
isSorted: function() { return false; },
isContainer : function(index) {return false;},
cycleHeader : function(column) {},
getRowProperties : function(row){ return ""; },
getColumnProperties : function(column){ return ""; },
getRowProperties : function(row) { return ""; },
getColumnProperties : function(column) { return ""; },
getCellProperties : function(row, column) {
if (column.element.getAttribute("id") == "rejectCol")
return "ltr";

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

@ -258,7 +258,7 @@ function* openPasswordContextMenu(browser, passwordInput, assertCallback = null)
/**
* Verify that only the expected form fields are filled.
*/
function* assertContextMenuFill(form, usernameField, passwordField, unchangedFields, loginIndex){
function* assertContextMenuFill(form, usernameField, passwordField, unchangedFields, loginIndex) {
let popupMenu = document.getElementById("fill-login-popup");
// Store the value of fields that should remain unchanged.

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

@ -27,7 +27,7 @@ function startAutocomplete() {
function submitForm() {
doKey("down");
doKey("return");
setTimeout(function(){ form.submit(); }, 100);
setTimeout(function() { form.submit(); }, 100);
}
var form = document.getElementById("form");

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

@ -73,7 +73,7 @@ add_task(function* maintenance_foreign_count_test() {
AND url = :t_url `);
stmt.params.t_url = T_URI.spec;
stmt.executeAsync({
handleCompletion: function(){
handleCompletion: function() {
deferred.resolve();
}
});
@ -92,7 +92,7 @@ add_task(function* maintenance_foreign_count_test() {
Assert.equal((yield getForeignCountForURL(conn, T_URI)), 0);
});
add_task(function* add_remove_tags_test(){
add_task(function* add_remove_tags_test() {
let conn = yield PlacesUtils.promiseDBConnection();
yield PlacesTestUtils.addVisits(T_URI);

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

@ -389,7 +389,7 @@ add_task(function* reorder_notification() {
},
];
let sorted = [];
for (let bm of bookmarks){
for (let bm of bookmarks) {
sorted.push(yield PlacesUtils.bookmarks.insert(bm));
}

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

@ -134,7 +134,7 @@ function* checkHistoryItems() {
* @returns false if the accessCount has not changed
* true if the accessCount has changed
*/
function isBookmarkAltered(){
function isBookmarkAltered() {
let options = PlacesUtils.history.getNewQueryOptions();
options.queryType = Ci.nsINavHistoryQueryOptions.QUERY_TYPE_BOOKMARKS;
options.maxResults = 1; // should only expect a new bookmark

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

@ -45,7 +45,7 @@ function add_old_anno(aIdentifier, aName, aValue, aExpirePolicy,
"WHERE item_id = :id " +
"ORDER BY dateAdded DESC LIMIT 1)";
}
else if (aIdentifier instanceof Ci.nsIURI){
else if (aIdentifier instanceof Ci.nsIURI) {
// Page annotation.
as.setPageAnnotation(aIdentifier, aName, aValue, 0, aExpirePolicy);
// Update dateAdded for the last added annotation.

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

@ -46,7 +46,7 @@ function add_old_anno(aIdentifier, aName, aValue, aExpirePolicy,
"ORDER BY a.dateAdded DESC LIMIT 1 " +
")";
}
else if (aIdentifier instanceof Ci.nsIURI){
else if (aIdentifier instanceof Ci.nsIURI) {
// Page annotation.
as.setPageAnnotation(aIdentifier, aName, aValue, 0, aExpirePolicy);
// Update dateAdded for the last added annotation.

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

@ -4,7 +4,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
function modHistoryTypes(val){
function modHistoryTypes(val) {
switch(val % 8) {
case 0:
case 1:

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

@ -712,7 +712,7 @@ AboutReader.prototype = {
}
},
_maybeSetTextDirection: function Read_maybeSetTextDirection(article){
_maybeSetTextDirection: function Read_maybeSetTextDirection(article) {
if(!article.dir)
return;

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

@ -33,7 +33,7 @@ var AutoCompleteE10SView = {
setTree: function(treeBox) { this.treeBox = treeBox; },
getCellText: function(idx, column) { return this.treeData[idx] },
isContainer: function(idx) { return false; },
getCellValue: function(idx, column){ return false },
getCellValue: function(idx, column) { return false },
isContainerOpen: function(idx) { return false; },
isContainerEmpty: function(idx) { return false; },
isSeparator: function(idx) { return false; },
@ -64,7 +64,7 @@ var AutoCompleteE10SView = {
AutoCompleteE10S.handleEnter(aIsPopupSelection);
},
stopSearch: function(){},
stopSearch: function() {},
// Internal JS-only API
clearResults: function() {

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

@ -2,7 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
(function(){
(function() {
var Cc = Components.classes;
var Ci = Components.interfaces;

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

@ -1,6 +1,6 @@
<html>
<script>
window.onbeforeunload = function(event){
window.onbeforeunload = function(event) {
event.returnValue = 'Test beforeunload handler';
}
</script>

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

@ -214,7 +214,7 @@ var processInfo = {
return null;
},
getCounters_Windows: function() {
if (!this._initialized){
if (!this._initialized) {
Cu.import("resource://gre/modules/ctypes.jsm");
this._IO_COUNTERS = new ctypes.StructType("IO_COUNTERS", [
{'readOps': ctypes.unsigned_long_long},

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

@ -427,7 +427,7 @@ add_task(function* test_changePingAfterSubmission() {
"The payload must not be changed after being submitted.");
});
add_task(function* test_telemetryEnabledUnexpectedValue(){
add_task(function* test_telemetryEnabledUnexpectedValue() {
// Remove the default value for toolkit.telemetry.enabled from the default prefs.
// Otherwise, we wouldn't be able to set the pref to a string.
let defaultPrefBranch = Services.prefs.getDefaultBranch(null);
@ -456,7 +456,7 @@ add_task(function* test_telemetryEnabledUnexpectedValue(){
"False must disable Telemetry recording.");
});
add_task(function* test_telemetryCleanFHRDatabase(){
add_task(function* test_telemetryCleanFHRDatabase() {
const FHR_DBNAME_PREF = "datareporting.healthreport.dbName";
const CUSTOM_DB_NAME = "unlikely.to.be.used.sqlite";
const DEFAULT_DB_NAME = "healthreport.sqlite";
@ -504,7 +504,7 @@ add_task(function* test_telemetryCleanFHRDatabase(){
}
});
add_task(function* stopServer(){
add_task(function* stopServer() {
yield PingServer.stop();
do_test_finished();
});

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

@ -587,7 +587,7 @@ function checkSystemSection(data) {
catch (e) {}
}
function checkActiveAddon(data){
function checkActiveAddon(data) {
let signedState = mozinfo.addon_signing ? "number" : "undefined";
// system add-ons have an undefined signState
if (data.isSystem)

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

@ -1861,7 +1861,7 @@ add_task(function* test_userIdleAndSchedlerTick() {
yield TelemetryController.testShutdown();
});
add_task(function* stopServer(){
add_task(function* stopServer() {
yield PingServer.stop();
do_test_finished();
});

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

@ -98,7 +98,7 @@ const BackgroundPageThumbs = {
// atomically test whether the file exists before writing it.
let exists = yield PageThumbsStorage.fileExistsForURL(url);
if (exists) {
if(options.onDone){
if(options.onDone) {
options.onDone(url);
}
return url;

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

@ -86,7 +86,7 @@ function checkOldStore() {
checkValue(aboutURI, "lockCol", "ordinal", "3");
}
add_task(function* testImport(){
add_task(function* testImport() {
let src = "localstore.rdf";
let dst = OS.Path.join(OS.Constants.Path.profileDir, src);

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

@ -949,21 +949,21 @@ function safeModeRestart() {
/**
* Set up event listeners for buttons.
*/
function setupEventListeners(){
function setupEventListeners() {
$("show-update-history-button").addEventListener("click", function (event) {
var prompter = Cc["@mozilla.org/updates/update-prompt;1"].createInstance(Ci.nsIUpdatePrompt);
prompter.showUpdateHistory(window);
});
$("reset-box-button").addEventListener("click", function (event){
$("reset-box-button").addEventListener("click", function (event) {
ResetProfile.openConfirmationDialog(window);
});
$("copy-raw-data-to-clipboard").addEventListener("click", function (event){
$("copy-raw-data-to-clipboard").addEventListener("click", function (event) {
copyRawDataToClipboard(this);
});
$("copy-to-clipboard").addEventListener("click", function (event){
$("copy-to-clipboard").addEventListener("click", function (event) {
copyContentsToClipboard();
});
$("profile-dir-button").addEventListener("click", function (event){
$("profile-dir-button").addEventListener("click", function (event) {
openProfileDirectory();
});
$("restart-in-safe-mode-button").addEventListener("click", function (event) {
@ -974,7 +974,7 @@ function setupEventListeners(){
safeModeRestart();
}
});
$("verify-place-integrity-button").addEventListener("click", function (event){
$("verify-place-integrity-button").addEventListener("click", function (event) {
PlacesDBUtils.checkAndFixDatabase(function(aLog) {
let msg = aLog.join("\n");
$("verify-place-result").style.display = "block";

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

@ -713,7 +713,7 @@ var EnvironmentData = {
this.createSubsection("addons", hasAddonData, addonSection, dataDiv);
},
appendRow: function(table, id, value){
appendRow: function(table, id, value) {
let row = document.createElement("tr");
this.appendColumn(row, "td", id);
this.appendColumn(row, "td", value);
@ -1209,7 +1209,7 @@ var Histogram = {
copyButton.className = "copy-node";
copyButton.appendChild(document.createTextNode(this.hgramCopyCaption));
copyButton.histogramText = aName + EOL + stats + EOL + EOL + textData;
copyButton.addEventListener("click", function(){
copyButton.addEventListener("click", function() {
Cc["@mozilla.org/widget/clipboardhelper;1"].getService(Ci.nsIClipboardHelper)
.copyString(this.histogramText);
});

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

@ -242,7 +242,7 @@ function promiseFindFinished(searchText, highlightOn) {
*/
function promiseFocus() {
return new Promise((resolve) => {
waitForFocus(function(){
waitForFocus(function() {
resolve();
}, content);
});

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

@ -86,5 +86,5 @@ SimpleTest.waitForExplicitFinish();
SimpleTest.requestCompleteLog();
window.addEventListener("load", function() {
SpecialPowers.pushPrefEnv({"set": [["media.cache_size", 40000]]}, function(){ runTest(0); });
SpecialPowers.pushPrefEnv({"set": [["media.cache_size", 40000]]}, function() { runTest(0); });
}, true);

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

@ -1067,7 +1067,7 @@
<handlers>
<handler event="dialogaccept">
<![CDATA[
if (!this._fireEvent("beforeaccept", this)){
if (!this._fireEvent("beforeaccept", this)) {
return false;
}

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

@ -65,7 +65,7 @@ this.getRandomId = function getRandomId() {
* copy source object into target, excluding private properties
* (those whose names begin with an underscore)
*/
this.objectCopy = function objectCopy(source, target){
this.objectCopy = function objectCopy(source, target) {
let desc;
Object.getOwnPropertyNames(source).forEach(function(name) {
if (name[0] !== '_') {

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

@ -207,7 +207,7 @@ var ClientIDImpl = {
* @return {Boolean} True when the client ID has valid format, or False
* otherwise.
*/
updateClientID: function (id){
updateClientID: function (id) {
if (!isValidClientID(id)) {
this._log.error("updateClientID - invalid client ID", id);
return false;

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

@ -15,7 +15,7 @@ add_task(function* () {
yield BrowserTestUtils.withNewTab({gBrowser, url}, testPromiseMessageAPI)
});
function* testPromiseMessageAPI(aBrowser){
function* testPromiseMessageAPI(aBrowser) {
// Reusing an existing message.
const msgKey = "DOM:WebManifest:hasManifestLink";
const mm = aBrowser.messageManager;

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

@ -164,7 +164,7 @@ var closeFileOutputStream = function(aKind, aFileName) {
// But once we close it, we can't anymore.
if (aKind == "atomic") {
FileUtils.closeAtomicFileOutputStream(fos);
} else if (aKind == "safe"){
} else if (aKind == "safe") {
FileUtils.closeSafeFileOutputStream(fos);
}
do_check_throws(function () {

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

@ -1740,7 +1740,7 @@ var AddonDatabase = {
* @return: Promise{Map}
* Resolves when the add-ons are retrieved from the database
*/
retrieveStoredData: function(){
retrieveStoredData: function() {
return this.openConnection().then(db => db.addons);
},

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

@ -7205,12 +7205,12 @@ AddonWrapper.prototype = {
}
}
if(this.isActive && addon.iconURL){
if(this.isActive && addon.iconURL) {
icons[32] = addon.iconURL;
icons[48] = addon.iconURL;
}
if(this.isActive && addon.icon64URL){
if(this.isActive && addon.icon64URL) {
icons[64] = addon.icon64URL;
}

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

@ -876,7 +876,7 @@ Blocklist.prototype = {
LOG("Blocklist::_preloadBlocklist: no XML File found");
}),
_preloadBlocklistFile: Task.async(function*(path){
_preloadBlocklistFile: Task.async(function*(path) {
if (this._addonEntries) {
// The file has been already loaded.
return;

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

@ -82,7 +82,7 @@ function bug523784_test2(win) {
win.addEventListener("load", function() {
win.removeEventListener("load", arguments.callee, false);
executeSoon(function(){
executeSoon(function() {
let moreInfoLink = win.document.getElementById("moreInfo");
let cancelButton = win.document.documentElement.getButton("cancel");
is(moreInfoLink.getAttribute("href"),

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

@ -211,7 +211,7 @@ function check_plugin_state(plugin) {
return plugin.disabled + "," + plugin.blocklisted;
}
function create_blocklistURL(blockID){
function create_blocklistURL(blockID) {
let url = Services.urlFormatter.formatURLPref(PREF_BLOCKLIST_ITEM_URL);
url = url.replace(/%blockID%/g, blockID);
return url;

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

@ -281,7 +281,7 @@ add_task(function*() {
});
// Check that the rollout policy sets work as expected
add_task(function*(){
add_task(function*() {
gAppInfo.browserTabsRemoteAutostart = true;
Services.prefs.setBoolPref("extensions.e10sBlocksEnabling", true);
Services.prefs.setCharPref("extensions.e10s.rollout.policy", "xpcshell-test");

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

@ -183,7 +183,7 @@ function check_test_1() {
do_check_eq(a1.icon64URL, uri + "icon64.png");
a1.uninstall();
do_execute_soon(function(){run_test_2(a1)});
do_execute_soon(function() {run_test_2(a1)});
});
});
}));

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

@ -625,7 +625,7 @@ add_task(function*() {
});
// Installing a temporary add-on over a non-restartless add-on should fail.
add_task(function*(){
add_task(function*() {
yield promiseInstallAllFiles([do_get_addon("test_install1")], true);
let non_restartless_ID = "addon1@tests.mozilla.org";

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

@ -137,7 +137,7 @@ var dialog = {
}
elm.setAttribute("description", uri.prePath);
}
else if (app instanceof Ci.nsIDBusHandlerApp){
else if (app instanceof Ci.nsIDBusHandlerApp) {
elm.setAttribute("description", app.method);
}
else

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

@ -58,7 +58,7 @@ function get_modules_under(uri) {
.concat(jar_entries(jarReader, "modules/*.jsm"));
jarReader.close();
return entries;
} else if (uri instanceof Ci.nsIFileURL){
} else if (uri instanceof Ci.nsIFileURL) {
let file = uri.QueryInterface(Ci.nsIFileURL);
return dir_entries(file.file, "components", ".js")
.concat(dir_entries(file.file, "modules", ".js"))

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

@ -227,7 +227,7 @@ function checkPasswords()
}
}
if (pw1 == pw2){
if (pw1 == pw2) {
ok.setAttribute("disabled","false");
} else
{

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

@ -469,8 +469,8 @@ var gUpdates = {
if (billboardTestURL) {
var updatesFoundBillboardPage = document.getElementById("updatesfoundbillboard");
updatesFoundBillboardPage.setAttribute("next", "dummy");
gUpdatesFoundBillboardPage.onExtra1 = function(){ gUpdates.wiz.cancel(); };
gUpdatesFoundBillboardPage.onExtra2 = function(){ gUpdates.wiz.cancel(); };
gUpdatesFoundBillboardPage.onExtra1 = function() { gUpdates.wiz.cancel(); };
gUpdatesFoundBillboardPage.onExtra2 = function() { gUpdates.wiz.cancel(); };
this.onWizardNext = function() { gUpdates.wiz.cancel(); };
this.update = { billboardURL : billboardTestURL,
brandName : this.brandName,
@ -1324,7 +1324,7 @@ var gErrorExtraPage = {
secHistogram.add(CoI.nsISecurityUITelemetry.WARNING_INSECURE_UPDATE);
}
else {
if (gUpdates.update.errorCode == CERT_ATTR_CHECK_FAILED_NO_UPDATE){
if (gUpdates.update.errorCode == CERT_ATTR_CHECK_FAILED_NO_UPDATE) {
document.getElementById("errorCertCheckNoUpdateLabel").hidden = false;
secHistogram.add(CoI.nsISecurityUITelemetry.WARNING_NO_SECURE_UPDATE);
}

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

@ -37,7 +37,7 @@ function UpdateServiceStub() {
}
}
UpdateServiceStub.prototype = {
observe: function(){},
observe: function() {},
classID: Components.ID("{e43b0010-04ba-4da6-b523-1f92580bc150}"),
QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver])
};