Use // for single line comments
This commit is contained in:
parent
26350f4ccb
commit
f4af744519
43 changed files with 311 additions and 310 deletions
|
@ -10,20 +10,20 @@ util = require('util');
|
|||
Module = require('module');
|
||||
|
||||
|
||||
/* We modified the original process.argv to let node.js load the atom.js, */
|
||||
// We modified the original process.argv to let node.js load the atom.js,
|
||||
|
||||
|
||||
/* we need to restore it here. */
|
||||
// we need to restore it here.
|
||||
|
||||
process.argv.splice(1, 1);
|
||||
|
||||
|
||||
/* Clear search paths. */
|
||||
// Clear search paths.
|
||||
|
||||
require(path.resolve(__dirname, '..', '..', 'common', 'lib', 'reset-search-paths'));
|
||||
|
||||
|
||||
/* Import common settings. */
|
||||
// Import common settings.
|
||||
|
||||
require(path.resolve(__dirname, '..', '..', 'common', 'lib', 'init'));
|
||||
|
||||
|
@ -34,7 +34,7 @@ if (!process.env.ELECTRON_HIDE_INTERNAL_MODULES) {
|
|||
}
|
||||
|
||||
|
||||
/* Expose public APIs. */
|
||||
// Expose public APIs.
|
||||
|
||||
globalPaths.push(path.resolve(__dirname, '..', 'api', 'lib', 'exports'));
|
||||
|
||||
|
@ -62,7 +62,7 @@ if (process.platform === 'win32') {
|
|||
console.log = console.error = console.warn = consoleLog;
|
||||
process.stdout.write = process.stderr.write = streamWrite;
|
||||
|
||||
/* Always returns EOF for stdin stream. */
|
||||
// Always returns EOF for stdin stream.
|
||||
Readable = require('stream').Readable;
|
||||
stdin = new Readable;
|
||||
stdin.push(null);
|
||||
|
@ -72,17 +72,17 @@ if (process.platform === 'win32') {
|
|||
}
|
||||
|
||||
|
||||
/* Don't quit on fatal error. */
|
||||
// Don't quit on fatal error.
|
||||
|
||||
process.on('uncaughtException', function(error) {
|
||||
|
||||
/* Do nothing if the user has a custom uncaught exception handler. */
|
||||
// Do nothing if the user has a custom uncaught exception handler.
|
||||
var dialog, message, ref, stack;
|
||||
if (process.listeners('uncaughtException').length > 1) {
|
||||
return;
|
||||
}
|
||||
|
||||
/* Show error in GUI. */
|
||||
// Show error in GUI.
|
||||
dialog = require('electron').dialog;
|
||||
stack = (ref = error.stack) != null ? ref : error.name + ": " + error.message;
|
||||
message = "Uncaught Exception:\n" + stack;
|
||||
|
@ -90,7 +90,7 @@ process.on('uncaughtException', function(error) {
|
|||
});
|
||||
|
||||
|
||||
/* Emit 'exit' event on quit. */
|
||||
// Emit 'exit' event on quit.
|
||||
|
||||
app = require('electron').app;
|
||||
|
||||
|
@ -99,24 +99,24 @@ app.on('quit', function(event, exitCode) {
|
|||
});
|
||||
|
||||
|
||||
/* Map process.exit to app.exit, which quits gracefully. */
|
||||
// Map process.exit to app.exit, which quits gracefully.
|
||||
|
||||
process.exit = app.exit;
|
||||
|
||||
|
||||
/* Load the RPC server. */
|
||||
// Load the RPC server.
|
||||
|
||||
require('./rpc-server');
|
||||
|
||||
|
||||
/* Load the guest view manager. */
|
||||
// Load the guest view manager.
|
||||
|
||||
require('./guest-view-manager');
|
||||
|
||||
require('./guest-window-manager');
|
||||
|
||||
|
||||
/* Now we try to load app's package.json. */
|
||||
// Now we try to load app's package.json.
|
||||
|
||||
packageJson = null;
|
||||
|
||||
|
@ -142,14 +142,14 @@ if (packageJson == null) {
|
|||
}
|
||||
|
||||
|
||||
/* Set application's version. */
|
||||
// Set application's version.
|
||||
|
||||
if (packageJson.version != null) {
|
||||
app.setVersion(packageJson.version);
|
||||
}
|
||||
|
||||
|
||||
/* Set application's name. */
|
||||
// Set application's name.
|
||||
|
||||
if (packageJson.productName != null) {
|
||||
app.setName(packageJson.productName);
|
||||
|
@ -158,7 +158,7 @@ if (packageJson.productName != null) {
|
|||
}
|
||||
|
||||
|
||||
/* Set application's desktop name. */
|
||||
// Set application's desktop name.
|
||||
|
||||
if (packageJson.desktopName != null) {
|
||||
app.setDesktopName(packageJson.desktopName);
|
||||
|
@ -167,12 +167,12 @@ if (packageJson.desktopName != null) {
|
|||
}
|
||||
|
||||
|
||||
/* Chrome 42 disables NPAPI plugins by default, reenable them here */
|
||||
// Chrome 42 disables NPAPI plugins by default, reenable them here
|
||||
|
||||
app.commandLine.appendSwitch('enable-npapi');
|
||||
|
||||
|
||||
/* Set the user path according to application's name. */
|
||||
// Set the user path according to application's name.
|
||||
|
||||
app.setPath('userData', path.join(app.getPath('appData'), app.getName()));
|
||||
|
||||
|
@ -181,21 +181,21 @@ app.setPath('userCache', path.join(app.getPath('cache'), app.getName()));
|
|||
app.setAppPath(packagePath);
|
||||
|
||||
|
||||
/* Load the chrome extension support. */
|
||||
// Load the chrome extension support.
|
||||
|
||||
require('./chrome-extension');
|
||||
|
||||
|
||||
/* Load internal desktop-capturer module. */
|
||||
// Load internal desktop-capturer module.
|
||||
|
||||
require('./desktop-capturer');
|
||||
|
||||
|
||||
/* Set main startup script of the app. */
|
||||
// Set main startup script of the app.
|
||||
|
||||
mainStartupScript = packageJson.main || 'index.js';
|
||||
|
||||
|
||||
/* Finally load app's main.js and transfer control to C++. */
|
||||
// Finally load app's main.js and transfer control to C++.
|
||||
|
||||
Module._load(path.join(packagePath, mainStartupScript), Module, true);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue