Taritsyn / JavaScriptEngineSwitcher

JavaScript Engine Switcher determines unified interface for access to the basic features of popular JavaScript engines. This library allows you to quickly and easily switch to using of another JavaScript engine.
Apache License 2.0
440 stars 49 forks source link

Control stack size for ChakraCore engine #49

Closed Bobris closed 6 years ago

Bobris commented 6 years ago

I have strange random stack overflows from inside JS code in ChakraCore (Win64 version). So I though ok I will increase stack by running JS code from Thread with bigger stack. Just to find out it does not have any difference. Then I find out your ScriptDispatcher class which prevents any such solution from calling code, with hardcode stack size. Would it be possibe to enhance code to optionally bypass this queue by some dummy implementation or be able to define stack size though settings?

Just to add nugets I using:

 <PackageReference Include="JavaScriptEngineSwitcher.ChakraCore" Version="3.0.0-alpha9" />
 <PackageReference Include="JavaScriptEngineSwitcher.ChakraCore.Native.win-x64" Version="3.0.0-alpha9" />
 <PackageReference Include="JavaScriptEngineSwitcher.ChakraCore.Native.linux-x64" Version="3.0.0-alpha9" />
 <PackageReference Include="JavaScriptEngineSwitcher.ChakraCore.Native.osx-x64" Version="3.0.0-alpha9" />
 <PackageReference Include="JavaScriptEngineSwitcher.Core" Version="3.0.0-alpha9" />
Taritsyn commented 6 years ago

Hello, Boris!

This problem was solved in version 3.0.0 Beta 1.

Bobris commented 6 years ago

Thank you very much. In mean time I found crashing bug in ChakraCore 1.8.2 itself, which they already solved in master so I am temporary also using custom build od Chakra, but this feature will allow me to return to your nugets as soon as there will be new version of ChakraCore published.