Closed Daniel15 closed 9 years ago
During installation of JavaScriptEngineSwitcher.V8
package the jsEngineSwitcher/v8
configuration section is automatically added to configuration file (Web.config
or App.config
).
True, but it should still handle the case of the config being null (eg. If I manually install it rather than using the NuGet package).
Sent from my mobile. On Apr 12, 2015 9:01 AM, "Andrey Taritsyn" notifications@github.com wrote:
During installation of JavaScriptEngineSwitcher.V8 package the jsEngineSwitcher/v8 configuration section is automatically added to configuration file (Web.config or App.config).
Reply to this email directly or view it on GitHub https://github.com/Taritsyn/JavaScriptEngineSwitcher/issues/12#issuecomment-92083497 .
If config being null, then will not work a JsEngineSwitcher.Current.CreateDefaultJsEngineInstance
method.
True - However you can still create a V8 engine through new V8JsEngine()
, which will crash with a NullReferenceException. The constructor should handle if v8Config
is null.
OK. In next release I will fix this error.
In the JavaScriptEngineSwitcher.V8 version 1.2.6 was fixed this error.
GetV8Configuration
returns the value ofConfigurationManager.GetSection("jsEngineSwitcher/v8")
. If this configuration section is not in theWeb.config
orApp.config
, this returnsnull
, resulting in a NullReferenceException in V8JsEngine's constructor: