Skip to content
Discussion options

You must be logged in to vote

Hello Ike,

Is it safe to use a compiled V8Script with another instance of V8ScriptEngine.

That's safe only if the script engines share a V8 runtime. Attempting to execute a compiled script in a foreign runtime should generate an exception, although there's currently a bug that causes a crash in this situation.

Is it safe to reuse an instance of V8ScriptEngine with multiple compiled scripts with the same function names?

If you mean that the scripts create global functions with the same names, then yes, that's safe.

Is it best to simply create a new instance of V8ScriptEngine every time I need to execute a V8Script and invoke a function in the script?

Creating a new engine instance is…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by IkeOTL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants