Merge pull request #4447 from KevinMartin/patch-3

Add ability to specify v8 flags in package.json
This commit is contained in:
Cheng Zhao 2016-02-17 10:42:29 +08:00
commit 7810f4293f

View file

@ -2,6 +2,7 @@ const fs = require('fs');
const path = require('path');
const util = require('util');
const Module = require('module');
const v8 = require('v8');
var slice = [].slice;
@ -129,6 +130,11 @@ if (packageJson.desktopName != null) {
app.setDesktopName((app.getName()) + ".desktop");
}
// Set v8 flags
if (packageJson.v8Flags != null) {
v8.setFlagsFromString(packageJson.v8Flags);
}
// Chrome 42 disables NPAPI plugins by default, reenable them here
app.commandLine.appendSwitch('enable-npapi');