diff options
Diffstat (limited to 'src/lj_gc.c')
-rw-r--r-- | src/lj_gc.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lj_gc.c b/src/lj_gc.c index 2aaf5b2c..012d0879 100644 --- a/src/lj_gc.c +++ b/src/lj_gc.c | |||
@@ -466,6 +466,7 @@ static void gc_call_finalizer(global_State *g, lua_State *L, | |||
466 | TValue *top; | 466 | TValue *top; |
467 | lj_trace_abort(g); | 467 | lj_trace_abort(g); |
468 | hook_entergc(g); /* Disable hooks and new traces during __gc. */ | 468 | hook_entergc(g); /* Disable hooks and new traces during __gc. */ |
469 | if (LJ_HASPROFILE && (oldh & HOOK_PROFILE)) lj_dispatch_update(g); | ||
469 | g->gc.threshold = LJ_MAX_MEM; /* Prevent GC steps. */ | 470 | g->gc.threshold = LJ_MAX_MEM; /* Prevent GC steps. */ |
470 | top = L->top; | 471 | top = L->top; |
471 | copyTV(L, top++, mo); | 472 | copyTV(L, top++, mo); |
@@ -474,6 +475,7 @@ static void gc_call_finalizer(global_State *g, lua_State *L, | |||
474 | L->top = top+1; | 475 | L->top = top+1; |
475 | errcode = lj_vm_pcall(L, top, 1+0, -1); /* Stack: |mo|o| -> | */ | 476 | errcode = lj_vm_pcall(L, top, 1+0, -1); /* Stack: |mo|o| -> | */ |
476 | hook_restore(g, oldh); | 477 | hook_restore(g, oldh); |
478 | if (LJ_HASPROFILE && (oldh & HOOK_PROFILE)) lj_dispatch_update(g); | ||
477 | g->gc.threshold = oldt; /* Restore GC threshold. */ | 479 | g->gc.threshold = oldt; /* Restore GC threshold. */ |
478 | if (errcode) | 480 | if (errcode) |
479 | lj_err_throw(L, errcode); /* Propagate errors. */ | 481 | lj_err_throw(L, errcode); /* Propagate errors. */ |