MCPcopy Create free account
hub / github.com/buke/quickjs-go / hasValidRef

Method hasValidRef

context.go:34–39  ·  view source on GitHub ↗

hasValidRef reports whether the context still has a valid native handle.

()

Source from the content-addressed store, hash-verified

32
33// hasValidRef reports whether the context still has a valid native handle.
34func (ctx *Context) hasValidRef() bool {
35 if ctx == nil || ctx.ref == nil || ctx.runtime == nil {
36 return false
37 }
38 return ctx.runtime.ensureOwnerAccess()
39}
40
41// isAlive reports whether the context can safely reach QuickJS.
42func (ctx *Context) isAlive() bool {

Callers 15

detectModuleSourceMethod · 0.95
duplicateValueMethod · 0.95
NewUint64Method · 0.95
NewStringUTF16Method · 0.95
NewDateMethod · 0.95
newSymbolMethod · 0.95
NewSymbolMethod · 0.95
NewGlobalSymbolMethod · 0.95
NewProxyMethod · 0.95
AtomFromValueMethod · 0.95
InvokeMethod · 0.95
EvalMethod · 0.95

Calls 1

ensureOwnerAccessMethod · 0.80

Tested by

no test coverage detected