Commit dde28061 authored by XhmikosR's avatar XhmikosR
Browse files

vnu-jar.js: pass `-Xss512k` for 32-bit Java to avoid a StackOverflowError error.

parent 930783cb
Showing with 8 additions and 1 deletion
+8 -1
...@@ -12,12 +12,14 @@ ...@@ -12,12 +12,14 @@
const childProcess = require('child_process') const childProcess = require('child_process')
const vnu = require('vnu-jar') const vnu = require('vnu-jar')
childProcess.exec('java -version', (error) => { childProcess.exec('java -version', (error, stdout, stderr) => {
if (error) { if (error) {
console.error('Skipping HTML lint test; Java is missing.') console.error('Skipping HTML lint test; Java is missing.')
return return
} }
const is32bitJava = !stderr.match(/64-Bit/)
// vnu-jar accepts multiple ignores joined with a `|` // vnu-jar accepts multiple ignores joined with a `|`
const ignores = [ const ignores = [
'Attribute “autocomplete” is only allowed when the input type is “color”, “date”, “datetime-local”, “email”, “hidden”, “month”, “number”, “password”, “range”, “search”, “tel”, “text”, “time”, “url”, or “week”.', 'Attribute “autocomplete” is only allowed when the input type is “color”, “date”, “datetime-local”, “email”, “hidden”, “month”, “number”, “password”, “range”, “search”, “tel”, “text”, “time”, “url”, or “week”.',
...@@ -44,6 +46,11 @@ childProcess.exec('java -version', (error) => { ...@@ -44,6 +46,11 @@ childProcess.exec('java -version', (error) => {
'js/tests/' 'js/tests/'
] ]
// For the 32-bit Java we need to pass `-Xss512k`
if (is32bitJava) {
args.splice(0, 0, '-Xss512k')
}
return childProcess.spawn('java', args, { return childProcess.spawn('java', args, {
shell: true, shell: true,
stdio: 'inherit' stdio: 'inherit'
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment