File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -2217,6 +2217,16 @@ void JS_FreeRuntime(JSRuntime *rt)
2217
2217
if (rt->rt_info)
2218
2218
printf("\n");
2219
2219
}
2220
+ #endif
2221
+
2222
+ while (rt->finalizers) {
2223
+ JSRuntimeFinalizerState *fs = rt->finalizers;
2224
+ rt->finalizers = fs->next;
2225
+ fs->finalizer(rt, fs->arg);
2226
+ js_free_rt(rt, fs);
2227
+ }
2228
+
2229
+ #ifdef DUMP_LEAKS
2220
2230
if (check_dump_flag(rt, DUMP_LEAKS)) {
2221
2231
JSMallocState *s = &rt->malloc_state;
2222
2232
if (s->malloc_count > 1) {
@@ -2229,13 +2239,6 @@ void JS_FreeRuntime(JSRuntime *rt)
2229
2239
}
2230
2240
#endif
2231
2241
2232
- while (rt->finalizers) {
2233
- JSRuntimeFinalizerState *fs = rt->finalizers;
2234
- rt->finalizers = fs->next;
2235
- fs->finalizer(rt, fs->arg);
2236
- js_free_rt(rt, fs);
2237
- }
2238
-
2239
2242
// FinalizationRegistry finalizers have run, no objects should remain
2240
2243
assert(list_empty(&rt->gc_obj_list));
2241
2244
You can’t perform that action at this time.
0 commit comments