Skip to content

Commit 062625c

Browse files
committed
In configuration settings of the Jint JS engine a AllowDebuggerStatement property has been returned so as not to break compatibility with previous versions
1 parent 01e624d commit 062625c

File tree

3 files changed

+17
-2
lines changed

3 files changed

+17
-2
lines changed

src/JavaScriptEngineSwitcher.Jint/JavaScriptEngineSwitcher.Jint.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
<Description>JavaScriptEngineSwitcher.Jint contains adapter `JintJsEngine` (wrapper for the Jint JavaScript Engine (http://github.com/sebastienros/jint) version 3.0.0 Beta 2002).</Description>
1414
<PackageIcon>icon.png</PackageIcon>
1515
<PackageTags>JavaScriptEngineSwitcher;JavaScript;ECMAScript;Jint</PackageTags>
16-
<PackageReleaseNotes>Runtime exceptions now contain a stack trace.</PackageReleaseNotes>
16+
<PackageReleaseNotes>1. Runtime exceptions now contain a stack trace;
17+
2. In configuration settings of the Jint JS engine a `AllowDebuggerStatement` property has been returned so as not to break compatibility with previous versions.</PackageReleaseNotes>
1718
</PropertyGroup>
1819

1920
<Import Project="../../build/common.props" />

src/JavaScriptEngineSwitcher.Jint/JintSettings.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,17 @@ namespace JavaScriptEngineSwitcher.Jint
1010
/// </summary>
1111
public sealed class JintSettings
1212
{
13+
/// <summary>
14+
/// Gets or sets a flag for whether to allow the <code>debugger</code> statement
15+
/// to be called in a script
16+
/// </summary>
17+
[Obsolete("Use a `DebuggerStatementHandlingMode` property")]
18+
public bool AllowDebuggerStatement
19+
{
20+
get { return DebuggerStatementHandlingMode == JsDebuggerStatementHandlingMode.Clr; }
21+
set { DebuggerStatementHandlingMode = value ? JsDebuggerStatementHandlingMode.Clr : JsDebuggerStatementHandlingMode.Ignore; }
22+
}
23+
1324
/// <summary>
1425
/// Gets or sets a debugger break callback
1526
/// </summary>

src/JavaScriptEngineSwitcher.Jint/readme.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@
1818
=============
1919
RELEASE NOTES
2020
=============
21-
Runtime exceptions now contain a stack trace.
21+
1. Runtime exceptions now contain a stack trace;
22+
2. In configuration settings of the Jint JS engine a `AllowDebuggerStatement`
23+
property has been returned so as not to break compatibility with previous
24+
versions.
2225

2326
=============
2427
DOCUMENTATION

0 commit comments

Comments
 (0)