From e82d45b0093a8482b8b94138d4de591a32b6bfcf Mon Sep 17 00:00:00 2001 From: Guo Xiang Tan Date: Mon, 11 Jun 2018 08:40:05 +0800 Subject: [PATCH] FIX: Ensure we have proper timeout for MiniRacer. --- lib/js_locale_helper.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/js_locale_helper.rb b/lib/js_locale_helper.rb index 24cd8d45fa8..8b66f56be96 100644 --- a/lib/js_locale_helper.rb +++ b/lib/js_locale_helper.rb @@ -229,10 +229,10 @@ module JsLocaleHelper def self.with_context @mutex.synchronize do yield @ctx ||= begin - ctx = MiniRacer::Context.new - ctx.load("#{Rails.root}/lib/javascripts/messageformat.js") - ctx - end + ctx = MiniRacer::Context.new(timeout: 15000) + ctx.load("#{Rails.root}/lib/javascripts/messageformat.js") + ctx + end end end