process.exit Engine Error
Closed this issue · 6 comments
try { V8Node.getExecutor("process.exit(0)").executeVoid(); } catch (JavetException e) { e.printStackTrace(); }
Executing "process.exit()" will cause the engine to report an error directly
This call is not supposed to be supported in Javet because of the Javet design.
So can I only block it manually?
Please try JavetSanitizer or swc4j that provides the AST analysis if you want to block it.
如果您想阻止它,请尝试提供 AST 分析的 JavetSanitizer 或 swc4j。
Then I also want to ask, is there an API that can serialize and print your V8ValueObject, that is, it is returned with the object, and finally it is a string, and all the properties are displayed, not [object Object] like that, and don't encounter toJsonString, if {} has an unrecognized object (function or the like), return {} like this
Or, just simply run the following.
> delete process.exit
true
> process.exit(0)
Uncaught TypeError: process.exit is not a function
或者,只需运行以下命令即可。
> delete process.exit true > process.exit(0) Uncaught TypeError: process.exit is not a function
I guess it would be better for me to rewrite the exit method myself to be compatible, but is there a solution to this problem #325 (comment)