Merge pull request #4447 from KevinMartin/patch-3
Add ability to specify v8 flags in package.json
This commit is contained in:
commit
7810f4293f
1 changed files with 6 additions and 0 deletions
|
@ -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');
|
||||
|
||||
|
|
Loading…
Reference in a new issue