Hello!
In version 7.4.5 when the limit specified by the MaxRuntimeHeapSize property of V8ScriptEngine class is exceeded, an “ScriptEngineException: The V8 runtime has exceeded its memory limit“ exception is no longer thrown. You can check this by using the following console application:
using Microsoft.ClearScript.V8;
namespace TestClearScriptV8
{
class Program
{
static void Main(string[] args)
{
const string input = @"var arr = [];
for (var i = 0; i < 10000; i++) {
arr.push('Current date: ' + new Date());
}";
using (var engine = new V8ScriptEngine { MaxRuntimeHeapSize = new UIntPtr(640 * 1024) })
{
engine.Execute(input);
}
}
}
}