File tree Expand file tree Collapse file tree 6 files changed +48
-9
lines changed
samples/JavaScriptEngineSwitcher.Sample.Logic
src/JavaScriptEngineSwitcher.Yantra
test/JavaScriptEngineSwitcher.Tests/Yantra Expand file tree Collapse file tree 6 files changed +48
-9
lines changed Original file line number Diff line number Diff line change 11{
22 "sdk" : {
3- "version" : " 7.0.402 "
3+ "version" : " 7.0.403 "
44 }
55}
Original file line number Diff line number Diff line change 4444 </ItemGroup >
4545
4646 <ItemGroup Condition =" '$(TargetFramework)' == 'net6.0' " >
47- <FrameworkReference Include =" Microsoft.AspNetCore.App" Version =" 6.0.23 " />
47+ <FrameworkReference Include =" Microsoft.AspNetCore.App" Version =" 6.0.24 " />
4848 </ItemGroup >
4949
5050 <ItemGroup Condition =" '$(TargetFramework)' == 'net7.0' " >
51- <FrameworkReference Include =" Microsoft.AspNetCore.App" Version =" 7.0.12 " />
51+ <FrameworkReference Include =" Microsoft.AspNetCore.App" Version =" 7.0.13 " />
5252 </ItemGroup >
5353
5454</Project >
Original file line number Diff line number Diff line change 1414 <Import Project =" ../../build/nuget-for-dotnet-lib.props" />
1515
1616 <PropertyGroup >
17- <Description >JavaScriptEngineSwitcher.Yantra contains adapter `YantraJsEngine` (wrapper for the Yantra JavaScript Engine (https://yantrajs.com) version 1.2.188 ).</Description >
17+ <Description >JavaScriptEngineSwitcher.Yantra contains adapter `YantraJsEngine` (wrapper for the Yantra JavaScript Engine (https://yantrajs.com) version 1.2.195 ).</Description >
1818 <PackageTags >$(PackageCommonTags);Yantra;YantraJS</PackageTags >
1919 <PackageIconFullPath >../../Icons/JavaScriptEngineSwitcher_Yantra_Logo128x128.png</PackageIconFullPath >
20- <PackageReleaseNotes >YantraJS was updated to version 1.2.188 .</PackageReleaseNotes >
20+ <PackageReleaseNotes >YantraJS was updated to version 1.2.195 .</PackageReleaseNotes >
2121 </PropertyGroup >
2222
2323 <ItemGroup >
24- <PackageReference Include =" YantraJS.Core" Version =" 1.2.188 " />
24+ <PackageReference Include =" YantraJS.Core" Version =" 1.2.195 " />
2525
2626 <ProjectReference Include =" ../JavaScriptEngineSwitcher.Core/JavaScriptEngineSwitcher.Core.csproj" />
2727 </ItemGroup >
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ public sealed class YantraJsEngine : JsEngineBase
4747 /// <summary>
4848 /// Version of original JS engine
4949 /// </summary>
50- private const string EngineVersion = "1.2.188 " ;
50+ private const string EngineVersion = "1.2.195 " ;
5151
5252 /// <summary>
5353 /// Regular expression for working with the error message
Original file line number Diff line number Diff line change 1212 DESCRIPTION
1313 ===========
1414 JavaScriptEngineSwitcher.Yantra contains adapter `YantraJsEngine` (wrapper for the
15- Yantra JavaScript Engine (https://yantrajs.com) version 1.2.188 ).
15+ Yantra JavaScript Engine (https://yantrajs.com) version 1.2.195 ).
1616
1717 =============
1818 RELEASE NOTES
1919 =============
20- YantraJS was updated to version 1.2.188 .
20+ YantraJS was updated to version 1.2.195 .
2121
2222 =============
2323 DOCUMENTATION
Original file line number Diff line number Diff line change @@ -181,6 +181,45 @@ public void MappingRuntimeErrorDuringExecutionOfCode()
181181 ) ;
182182 }
183183
184+ [ Fact ]
185+ public void MappingRuntimeErrorDuringStackOverflow ( )
186+ {
187+ // Arrange
188+ const string input = @"var i = 0;
189+
190+ function recursive() {
191+ i++;
192+ recursive();
193+ }
194+
195+ recursive();" ;
196+
197+ JsRuntimeException exception = null ;
198+
199+ // Act
200+ using ( var jsEngine = CreateJsEngine ( ) )
201+ {
202+ try
203+ {
204+ jsEngine . Execute ( input , "recursive.js" ) ;
205+ }
206+ catch ( JsRuntimeException e )
207+ {
208+ exception = e ;
209+ }
210+ }
211+
212+ // Assert
213+ Assert . NotNull ( exception ) ;
214+ Assert . Equal ( "Runtime error" , exception . Category ) ;
215+ Assert . Equal ( "Maximum call stack size exceeded" , exception . Description ) ;
216+ Assert . Equal ( "RangeError" , exception . Type ) ;
217+ Assert . Equal ( "recursive.js" , exception . DocumentName ) ;
218+ Assert . Equal ( 5 , exception . LineNumber ) ;
219+ Assert . Equal ( 1 , exception . ColumnNumber ) ;
220+ Assert . Empty ( exception . SourceFragment ) ;
221+ }
222+
184223 #endregion
185224
186225 #region Generation of error messages
You can’t perform that action at this time.
0 commit comments