Clean up variable declarations
This commit is contained in:
parent
5a4a8e1fa7
commit
003de0debe
4 changed files with 9 additions and 9 deletions
|
@ -60,10 +60,10 @@ var fn = function(name) {
|
||||||
return webContents.emit.apply(webContents, [name, event].concat(slice.call(args)));
|
return webContents.emit.apply(webContents, [name, event].concat(slice.call(args)));
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
var i, len;
|
var i, len, name;
|
||||||
for (i = 0, len = ref1.length; i < len; i++) {
|
for (i = 0, len = ref1.length; i < len; i++) {
|
||||||
var name = ref1[i];
|
name = ref1[i];
|
||||||
fn(name);
|
fn(ref1[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Deprecated.
|
// Deprecated.
|
||||||
|
|
|
@ -163,8 +163,8 @@ module.exports = {
|
||||||
|
|
||||||
// Mark standard asynchronous functions.
|
// Mark standard asynchronous functions.
|
||||||
var ref1 = ['showMessageBox', 'showOpenDialog', 'showSaveDialog'];
|
var ref1 = ['showMessageBox', 'showOpenDialog', 'showSaveDialog'];
|
||||||
var j, len
|
var j, len, api;
|
||||||
for (j = 0, len = ref1.length; j < len; j++) {
|
for (j = 0, len = ref1.length; j < len; j++) {
|
||||||
var api = ref1[j];
|
api = ref1[j];
|
||||||
v8Util.setHiddenValue(module.exports[api], 'asynchronous', true);
|
v8Util.setHiddenValue(module.exports[api], 'asynchronous', true);
|
||||||
}
|
}
|
||||||
|
|
|
@ -91,9 +91,9 @@ require('./guest-window-manager');
|
||||||
// Now we try to load app's package.json.
|
// Now we try to load app's package.json.
|
||||||
var packageJson = null;
|
var packageJson = null;
|
||||||
var searchPaths = ['app', 'app.asar', 'default_app'];
|
var searchPaths = ['app', 'app.asar', 'default_app'];
|
||||||
var i, len;
|
var i, len, packagePath;
|
||||||
for (i = 0, len = searchPaths.length; i < len; i++) {
|
for (i = 0, len = searchPaths.length; i < len; i++) {
|
||||||
var packagePath = searchPaths[i];
|
packagePath = searchPaths[i];
|
||||||
try {
|
try {
|
||||||
packagePath = path.join(process.resourcesPath, packagePath);
|
packagePath = path.join(process.resourcesPath, packagePath);
|
||||||
packageJson = JSON.parse(fs.readFileSync(path.join(packagePath, 'package.json')));
|
packageJson = JSON.parse(fs.readFileSync(path.join(packagePath, 'package.json')));
|
||||||
|
|
|
@ -45,9 +45,9 @@ var nodeIntegration = 'false';
|
||||||
var preloadScript = null;
|
var preloadScript = null;
|
||||||
|
|
||||||
var ref = process.argv;
|
var ref = process.argv;
|
||||||
var i, len;
|
var i, len, arg;
|
||||||
for (i = 0, len = ref.length; i < len; i++) {
|
for (i = 0, len = ref.length; i < len; i++) {
|
||||||
var arg = ref[i];
|
arg = ref[i];
|
||||||
if (arg.indexOf('--guest-instance-id=') === 0) {
|
if (arg.indexOf('--guest-instance-id=') === 0) {
|
||||||
// This is a guest web view.
|
// This is a guest web view.
|
||||||
process.guestInstanceId = parseInt(arg.substr(arg.indexOf('=') + 1));
|
process.guestInstanceId = parseInt(arg.substr(arg.indexOf('=') + 1));
|
||||||
|
|
Loading…
Reference in a new issue