robertkrimen / otto

A JavaScript interpreter in Go (golang)
http://godoc.org/github.com/robertkrimen/otto
MIT License
8.04k stars 584 forks source link

JS VM crashing go #444

Closed ssharish closed 1 year ago

ssharish commented 1 year ago

This is not a bug, more of an ask, since I could not find any relevant information anywhere.

Is it possible to run JS VM as a separate process detached from the GO binary in which it is used? or Is there a way to not crash GO binary during runtime, due to JS code error, e.g. JS stackoverflow?

Thanks in advance.

stevenh commented 1 year ago

As it's running go code you couldn't run it separately, however you could have your app run the vm in a separate process, but hat more a task of your app than this library.

That said do you have a small test which replicates this?

ssharish commented 1 year ago

Thanks Steven.