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++) {
- var name = ref1[i];
- fn(name);
+ name = ref1[i];
+ fn(ref1[i]);
}
// Deprecated.
// Mark standard asynchronous functions.
var ref1 = ['showMessageBox', 'showOpenDialog', 'showSaveDialog'];
-var j, len
+var j, len, api;
for (j = 0, len = ref1.length; j < len; j++) {
- var api = ref1[j];
+ api = ref1[j];
v8Util.setHiddenValue(module.exports[api], 'asynchronous', true);
}
// Now we try to load app's package.json.
var packageJson = null;
var searchPaths = ['app', 'app.asar', 'default_app'];
-var i, len;
+var i, len, packagePath;
for (i = 0, len = searchPaths.length; i < len; i++) {
- var packagePath = searchPaths[i];
+ packagePath = searchPaths[i];
try {
packagePath = path.join(process.resourcesPath, packagePath);
packageJson = JSON.parse(fs.readFileSync(path.join(packagePath, 'package.json')));
var preloadScript = null;
var ref = process.argv;
-var i, len;
+var i, len, arg;
for (i = 0, len = ref.length; i < len; i++) {
- var arg = ref[i];
+ arg = ref[i];
if (arg.indexOf('--guest-instance-id=') === 0) {
// This is a guest web view.
process.guestInstanceId = parseInt(arg.substr(arg.indexOf('=') + 1));