lightpanda-io / zig-v8-fork

MIT License
2 stars 0 forks source link

Mandatory origin argument in Script.compile #6

Open francisbouvier opened 11 months ago

francisbouvier commented 11 months ago

v8::Script::Compile requires an origin argument, which is a pointer to a v8.ScriptOrigin.

The actual implementation in Zig Script.compile allow to pass null which will cause the following v8 crash:

#
# Fatal error in v8::ScriptCompiler::Compile
# v8::ScriptCompiler::CompileModule must be used to compile modules
#

We should instead make this parameter non-optional.