From 8f59917f6bc205bb3a92e93aa938a75668c4d0a9 Mon Sep 17 00:00:00 2001
From: Jeff Atwood <jatwood@codinghorror.com>
Date: Tue, 29 Mar 2016 16:43:00 -0700
Subject: [PATCH] increase es6 transpiler timeout from 5 to 10 sec

---
 .../tilt/es6_module_transpiler_template.rb                      | 2 +-
 lib/pretty_text.rb                                              | 2 +-
 2 files changed, 2 insertions(+), 2 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 b0d6f1b91..f827746ea 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,7 @@ module Tilt
     end
 
     def self.create_new_context
-      ctx = V8::Context.new(timeout: 5000)
+      ctx = V8::Context.new(timeout: 10000)
       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 3f30fbd3f..cfd9b53c2 100644
--- a/lib/pretty_text.rb
+++ b/lib/pretty_text.rb
@@ -78,7 +78,7 @@ module PrettyText
 
   def self.create_new_context
     # timeout any eval that takes longer that 5 seconds
-    ctx = V8::Context.new(timeout: 5000)
+    ctx = V8::Context.new(timeout: 10000)
 
     ctx["helpers"] = Helpers.new