hasValidContext reports whether a Value still has a usable context pointer.
()
| 48 | |
| 49 | // hasValidContext reports whether a Value still has a usable context pointer. |
| 50 | func (v *Value) hasValidContext() bool { |
| 51 | return v != nil && v.ctx != nil && v.ctx.hasValidRef() |
| 52 | } |
| 53 | |
| 54 | // isAlive reports whether a Value can safely reach QuickJS. |
| 55 | func (v *Value) isAlive() bool { |