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 1
1
{
2
2
"sdk" : {
3
- "version" : " 7.0.402 "
3
+ "version" : " 7.0.403 "
4
4
}
5
5
}
Original file line number Diff line number Diff line change 44
44
</ItemGroup >
45
45
46
46
<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 " />
48
48
</ItemGroup >
49
49
50
50
<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 " />
52
52
</ItemGroup >
53
53
54
54
</Project >
Original file line number Diff line number Diff line change 14
14
<Import Project =" ../../build/nuget-for-dotnet-lib.props" />
15
15
16
16
<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 >
18
18
<PackageTags >$(PackageCommonTags);Yantra;YantraJS</PackageTags >
19
19
<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 >
21
21
</PropertyGroup >
22
22
23
23
<ItemGroup >
24
- <PackageReference Include =" YantraJS.Core" Version =" 1.2.188 " />
24
+ <PackageReference Include =" YantraJS.Core" Version =" 1.2.195 " />
25
25
26
26
<ProjectReference Include =" ../JavaScriptEngineSwitcher.Core/JavaScriptEngineSwitcher.Core.csproj" />
27
27
</ItemGroup >
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ public sealed class YantraJsEngine : JsEngineBase
47
47
/// <summary>
48
48
/// Version of original JS engine
49
49
/// </summary>
50
- private const string EngineVersion = "1.2.188 " ;
50
+ private const string EngineVersion = "1.2.195 " ;
51
51
52
52
/// <summary>
53
53
/// Regular expression for working with the error message
Original file line number Diff line number Diff line change 12
12
DESCRIPTION
13
13
===========
14
14
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 ).
16
16
17
17
=============
18
18
RELEASE NOTES
19
19
=============
20
- YantraJS was updated to version 1.2.188 .
20
+ YantraJS was updated to version 1.2.195 .
21
21
22
22
=============
23
23
DOCUMENTATION
Original file line number Diff line number Diff line change @@ -181,6 +181,45 @@ public void MappingRuntimeErrorDuringExecutionOfCode()
181
181
) ;
182
182
}
183
183
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
+
184
223
#endregion
185
224
186
225
#region Generation of error messages
You can’t perform that action at this time.
0 commit comments