Remove extra newlines around comments

This commit is contained in:
Kevin Sawicki 2016-01-14 11:10:12 -08:00
parent 990dc30e8d
commit 030d2a843c
40 changed files with 103 additions and 425 deletions

View file

@ -10,7 +10,6 @@ module.exports = CallbacksRegistry = (function() {
}
CallbacksRegistry.prototype.add = function(callback) {
// The callback is already added.
var filenameAndLine, id, location, match, ref, regexp, stackString, x;
id = v8Util.getHiddenValue(callback, 'callbackId');

View file

@ -1,5 +1,4 @@
if (process.platform === 'linux' && process.type === 'renderer') {
// On Linux we could not access clipboard in renderer process.
module.exports = require('electron').remote.clipboard;
} else {

View file

@ -1,4 +1,3 @@
// Deprecate a method.
var deprecate,
slice = [].slice;
@ -15,9 +14,7 @@ deprecate = function(oldName, newName, fn) {
};
};
// The method is renamed.
deprecate.rename = function(object, oldName, newName) {
var newMethod, warned;
warned = false;
@ -35,9 +32,7 @@ deprecate.rename = function(object, oldName, newName) {
}
};
// Forward the method to member.
deprecate.member = function(object, method, member) {
var warned;
warned = false;
@ -50,9 +45,7 @@ deprecate.member = function(object, method, member) {
};
};
// Deprecate a property.
deprecate.property = function(object, property, method) {
return Object.defineProperty(object, property, {
get: function() {
@ -67,9 +60,7 @@ deprecate.property = function(object, property, method) {
});
};
// Deprecate an event.
deprecate.event = function(emitter, oldName, newName, fn) {
var warned;
warned = false;
@ -92,16 +83,12 @@ deprecate.event = function(emitter, oldName, newName, fn) {
});
};
// Print deprecation warning.
deprecate.warn = function(oldName, newName) {
return deprecate.log(oldName + " is deprecated. Use " + newName + " instead.");
};
// Print deprecation message.
deprecate.log = function(message) {
if (process.throwDeprecation) {
throw new Error(message);

View file

@ -1,4 +1,3 @@
// Do not expose the internal modules to `require`.
exports.hideInternalModules = function() {
var globalPaths;
@ -10,9 +9,7 @@ exports.hideInternalModules = function() {
}
};
// Attaches properties to |exports|.
exports.defineProperties = function(exports) {
return Object.defineProperties(exports, {

View file

@ -4,9 +4,7 @@ deprecate = require('electron').deprecate;
nativeImage = process.atomBinding('native_image');
// Deprecated.
deprecate.rename(nativeImage, 'createFromDataUrl', 'createFromDataURL');
module.exports = nativeImage;

View file

@ -10,9 +10,7 @@ path = require('path');
util = require('util');
// Cache asar archive objects.
cachedArchives = {};
getOrCreateArchive = function(p) {
@ -28,9 +26,7 @@ getOrCreateArchive = function(p) {
return cachedArchives[p] = archive;
};
// Clean cache on quit.
process.on('exit', function() {
var archive, p, results;
results = [];
@ -42,9 +38,7 @@ process.on('exit', function() {
return results;
});
// Separate asar package's path from full path.
splitPath = function(p) {
// shortcut to disable asar.
@ -66,9 +60,7 @@ splitPath = function(p) {
return [true, p.substr(0, index + 5), p.substr(index + 6)];
};
// Convert asar archive's Stats object to fs's Stats object.
nextInode = 0;
uid = process.getuid != null ? process.getuid() : 0;
@ -115,9 +107,7 @@ asarStatsToFsStats = function(stats) {
};
};
// Create a ENOENT error.
notFoundError = function(asarPath, filePath, callback) {
var error;
error = new Error("ENOENT, " + filePath + " not found in " + asarPath);
@ -131,9 +121,7 @@ notFoundError = function(asarPath, filePath, callback) {
});
};
// Create a ENOTDIR error.
notDirError = function(callback) {
var error;
error = new Error('ENOTDIR, not a directory');
@ -147,9 +135,7 @@ notDirError = function(callback) {
});
};
// Create invalid archive error.
invalidArchiveError = function(asarPath, callback) {
var error;
error = new Error("Invalid package " + asarPath);
@ -161,9 +147,7 @@ invalidArchiveError = function(asarPath, callback) {
});
};
// Override APIs that rely on passing file path instead of content to C++.
overrideAPISync = function(module, name, arg) {
var old;
if (arg == null) {
@ -220,9 +204,7 @@ overrideAPI = function(module, name, arg) {
};
};
// Override fs APIs.
exports.wrapFsWithAsar = function(fs) {
var exists, existsSync, internalModuleReadFile, internalModuleStat, lstat, lstatSync, mkdir, mkdirSync, open, openSync, readFile, readFileSync, readdir, readdirSync, realpath, realpathSync, stat, statSync, statSyncNoException;
lstatSync = fs.lstatSync;

View file

@ -21,7 +21,6 @@ process.atomBinding = function(name) {
};
if (!process.env.ELECTRON_HIDE_INTERNAL_MODULES) {
// Add common/api/lib to module search paths.
Module.globalPaths.push(path.resolve(__dirname, '..', 'api', 'lib'));
}
@ -47,7 +46,6 @@ global.setImmediate = wrapWithActivateUvLoop(timers.setImmediate);
global.clearImmediate = timers.clearImmediate;
if (process.type === 'browser') {
// setTimeout needs to update the polling timeout of the event loop, when
// called under Chromium's event loop the node's event loop won't get a chance
// to update the timeout, so we have to force the node's event loop to

View file

@ -4,21 +4,15 @@ path = require('path');
Module = require('module');
// Clear Node's global search paths.
Module.globalPaths.length = 0;
// Clear current and parent(init.coffee)'s search paths.
module.paths = [];
module.parent.paths = [];
// Prevent Node from adding paths outside this app to search paths.
Module._nodeModulePaths = function(from) {
var dir, i, part, parts, paths, skipOutsidePaths, splitRe, tip;
from = path.resolve(from);