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
2020 * JavaScriptEngineSwitcher.ChakraCore.Native.debian-x64
2121 * JavaScriptEngineSwitcher.ChakraCore.Native.osx-x64</description >
2222 <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 >
2424 <copyright >Copyright (c) 2013-2017 Andrey Taritsyn - http://www.taritsyn.ru</copyright >
2525 <language >en-US</language >
2626 <tags >JavaScriptEngineSwitcher JavaScript ECMAScript ChakraCore</tags >
Original file line number Diff line number Diff line change 3030 =============
3131 RELEASE NOTES
3232 =============
33- ChakraCore was updated to version 1.5.0 .
33+ An attempt was made to prevent occurrence of the access violation exception .
3434
3535 =============
3636 DOCUMENTATION
Original file line number Diff line number Diff line change @@ -160,6 +160,7 @@ public ChakraCoreJsEngine(ChakraCoreSettings settings)
160160 {
161161 _jsRuntime = JsRuntime . Create ( attributes , null ) ;
162162 _jsContext = _jsRuntime . CreateContext ( ) ;
163+ _jsContext . AddRef ( ) ;
163164 }
164165 catch ( Exception e )
165166 {
@@ -1178,7 +1179,11 @@ private void Dispose(bool disposing)
11781179 {
11791180 if ( _dispatcher != null )
11801181 {
1181- _dispatcher . Invoke ( ( ) => _jsRuntime . Dispose ( ) ) ;
1182+ _dispatcher . Invoke ( ( ) =>
1183+ {
1184+ _jsContext . Release ( ) ;
1185+ _jsRuntime . Dispose ( ) ;
1186+ } ) ;
11821187 _dispatcher . Dispose ( ) ;
11831188 }
11841189
You can’t perform that action at this time.
0 commit comments