oven-sh/bun

tracking: JSValue safety in our Zig and JS bindings

Opened this issue · 1 comments

  • better code generator
  • #15100
  • #15120
  • #15127
  • #15128
  • replace orelse return null with try
  • replace catch return null with try (done in 15120)
  • make JSValue.get() return a possible JSError
  • make JSValue.toZigString() return a possible JSError
  • make globalThis.throw* return a JSError
  • when done, audit all globalThis.hasException() calls for redundancy
  • audit all fromJS() functions to return possible JSError
  • make globalThis.ERR_*().throw() return a JSError

more to come

to add to this list: bun.string.toJSByParseJSON could throw and should return bun.JSError!JSC.JSValue