Skip to content

V8 config can be null #12

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Daniel15 opened this issue Apr 12, 2015 · 6 comments
Closed

V8 config can be null #12

Daniel15 opened this issue Apr 12, 2015 · 6 comments

Comments

@Daniel15
Copy link

GetV8Configuration returns the value of ConfigurationManager.GetSection("jsEngineSwitcher/v8"). If this configuration section is not in the Web.config or App.config, this returns null, resulting in a NullReferenceException in V8JsEngine's constructor:

image

Daniel15 added a commit to reactjs/React.NET that referenced this issue Apr 12, 2015
@Taritsyn
Copy link
Owner

During installation of JavaScriptEngineSwitcher.V8 package the jsEngineSwitcher/v8 configuration section is automatically added to configuration file (Web.config or App.config).

@Daniel15
Copy link
Author

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
#12 (comment)
.

@Taritsyn
Copy link
Owner

If config being null, then will not work a JsEngineSwitcher.Current.CreateDefaultJsEngineInstance method.

@Daniel15
Copy link
Author

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.

@Taritsyn
Copy link
Owner

OK. In next release I will fix this error.

Taritsyn added a commit that referenced this issue May 5, 2015
1. In JavaScriptEngineSwitcher.Msie added support of MSIE JavaScript Engine version 1.5.3;
2. In JavaScriptEngineSwitcher.V8 fixed a bug #12 “V8 config can be null”;
3. In JavaScriptEngineSwitcher.Jint added support of Jint version of April 30, 2015.
@Taritsyn
Copy link
Owner

Taritsyn commented May 5, 2015

In the JavaScriptEngineSwitcher.V8 version 1.2.6 was fixed this error.

onlinehub0808 added a commit to onlinehub0808/React.NET that referenced this issue Jun 2, 2023
Giant775 added a commit to Giant775/React-.NET that referenced this issue Oct 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants