isAlive reports whether a Value can safely reach QuickJS.
()
| 53 | |
| 54 | // isAlive reports whether a Value can safely reach QuickJS. |
| 55 | func (v *Value) isAlive() bool { |
| 56 | return v != nil && v.ctx != nil && v.ctx.isAlive() && v.ctx.hasValidRef() |
| 57 | } |
| 58 | |
| 59 | // belongsTo reports whether a Value belongs to the given live Context. |
| 60 | func (v *Value) belongsTo(ctx *Context) bool { |