core: add callback to VM context

This commit is contained in:
Anna Shaleva 2020-11-24 15:45:14 +03:00
parent c9acc43023
commit 0f68528095
7 changed files with 19 additions and 7 deletions

View file

@ -1410,6 +1410,9 @@ func (v *VM) unloadContext(ctx *Context) {
if ctx.static != nil && currCtx != nil && ctx.static != currCtx.static {
ctx.static.Clear()
}
if ctx.Callback != nil {
ctx.Callback(ctx)
}
switch ctx.CheckReturn {
case NoCheck:
case EnsureIsEmpty: