File tree Expand file tree Collapse file tree 3 files changed +8
-3
lines changed
NuGet/JavaScriptEngineSwitcher.ChakraCore
src/JavaScriptEngineSwitcher.ChakraCore Expand file tree Collapse file tree 3 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ This package does not contain the native implementations of ChakraCore. Therefor
20
20
* JavaScriptEngineSwitcher.ChakraCore.Native.debian-x64
21
21
* JavaScriptEngineSwitcher.ChakraCore.Native.osx-x64</description >
22
22
<summary >JavaScriptEngineSwitcher.ChakraCore contains adapter `ChakraCoreJsEngine` (wrapper for the ChakraCore).</summary >
23
- <releaseNotes >ChakraCore was updated to version 1.5.0 .</releaseNotes >
23
+ <releaseNotes >An attempt was made to prevent occurrence of the access violation exception .</releaseNotes >
24
24
<copyright >Copyright (c) 2013-2017 Andrey Taritsyn - http://www.taritsyn.ru</copyright >
25
25
<language >en-US</language >
26
26
<tags >JavaScriptEngineSwitcher JavaScript ECMAScript ChakraCore</tags >
Original file line number Diff line number Diff line change 30
30
=============
31
31
RELEASE NOTES
32
32
=============
33
- ChakraCore was updated to version 1.5.0 .
33
+ An attempt was made to prevent occurrence of the access violation exception .
34
34
35
35
=============
36
36
DOCUMENTATION
Original file line number Diff line number Diff line change @@ -160,6 +160,7 @@ public ChakraCoreJsEngine(ChakraCoreSettings settings)
160
160
{
161
161
_jsRuntime = JsRuntime . Create ( attributes , null ) ;
162
162
_jsContext = _jsRuntime . CreateContext ( ) ;
163
+ _jsContext . AddRef ( ) ;
163
164
}
164
165
catch ( Exception e )
165
166
{
@@ -1178,7 +1179,11 @@ private void Dispose(bool disposing)
1178
1179
{
1179
1180
if ( _dispatcher != null )
1180
1181
{
1181
- _dispatcher . Invoke ( ( ) => _jsRuntime . Dispose ( ) ) ;
1182
+ _dispatcher . Invoke ( ( ) =>
1183
+ {
1184
+ _jsContext . Release ( ) ;
1185
+ _jsRuntime . Dispose ( ) ;
1186
+ } ) ;
1182
1187
_dispatcher . Dispose ( ) ;
1183
1188
}
1184
1189
You can’t perform that action at this time.
0 commit comments