From ed446ca4876639f6bfc7b064c2e3deb85da9f4c1 Mon Sep 17 00:00:00 2001 From: Jeff Atwood Date: Thu, 21 Apr 2016 16:52:12 -0700 Subject: [PATCH] increase transpiler timeout to 15 sec --- .../tilt/es6_module_transpiler_template.rb | 3 ++- lib/pretty_text.rb | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/es6_module_transpiler/tilt/es6_module_transpiler_template.rb b/lib/es6_module_transpiler/tilt/es6_module_transpiler_template.rb index f827746ea7d..58eb0e678cf 100644 --- a/lib/es6_module_transpiler/tilt/es6_module_transpiler_template.rb +++ b/lib/es6_module_transpiler/tilt/es6_module_transpiler_template.rb @@ -29,7 +29,8 @@ module Tilt end 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("module = {}; exports = {};"); ctx.load("#{Rails.root}/lib/es6_module_transpiler/support/es6-module-transpiler.js") diff --git a/lib/pretty_text.rb b/lib/pretty_text.rb index d72496074cb..bc804a1613f 100644 --- a/lib/pretty_text.rb +++ b/lib/pretty_text.rb @@ -77,8 +77,8 @@ module PrettyText end def self.create_new_context - # timeout any eval that takes longer that 5 seconds - ctx = V8::Context.new(timeout: 10000) + # timeout any eval that takes longer than 15 seconds + ctx = V8::Context.new(timeout: 15000) ctx["helpers"] = Helpers.new