increase transpiler timeout to 15 sec
This commit is contained in:
parent
72761ab938
commit
ed446ca487
|
@ -29,7 +29,8 @@ module Tilt
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.create_new_context
|
def self.create_new_context
|
||||||
ctx = V8::Context.new(timeout: 10000)
|
# timeout any eval that takes longer than 15 seconds
|
||||||
|
ctx = V8::Context.new(timeout: 15000)
|
||||||
ctx.eval("var self = this; #{File.read(Babel::Transpiler.script_path)}")
|
ctx.eval("var self = this; #{File.read(Babel::Transpiler.script_path)}")
|
||||||
ctx.eval("module = {}; exports = {};");
|
ctx.eval("module = {}; exports = {};");
|
||||||
ctx.load("#{Rails.root}/lib/es6_module_transpiler/support/es6-module-transpiler.js")
|
ctx.load("#{Rails.root}/lib/es6_module_transpiler/support/es6-module-transpiler.js")
|
||||||
|
|
|
@ -77,8 +77,8 @@ module PrettyText
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.create_new_context
|
def self.create_new_context
|
||||||
# timeout any eval that takes longer that 5 seconds
|
# timeout any eval that takes longer than 15 seconds
|
||||||
ctx = V8::Context.new(timeout: 10000)
|
ctx = V8::Context.new(timeout: 15000)
|
||||||
|
|
||||||
ctx["helpers"] = Helpers.new
|
ctx["helpers"] = Helpers.new
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue