File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -2034,8 +2034,10 @@ static void zend_gc_collect_cycles_coroutine(void)
2034
2034
}
2035
2035
2036
2036
if (GC_G (microtask ) != NULL ) {
2037
- GC_G (microtask )-> is_cancelled = true;
2038
- ZEND_ASYNC_MICROTASK_RELEASE (GC_G (microtask ));
2037
+ zend_async_microtask_t * microtask = GC_G (microtask );
2038
+ GC_G (microtask ) = NULL ;
2039
+ microtask -> is_cancelled = true;
2040
+ ZEND_ASYNC_MICROTASK_RELEASE (microtask );
2039
2041
}
2040
2042
}
2041
2043
@@ -2066,8 +2068,10 @@ static void coroutine_dispose(zend_coroutine_t *coroutine)
2066
2068
GC_G (dtor_scope ) = NULL ;
2067
2069
2068
2070
if (GC_G (microtask ) != NULL ) {
2069
- GC_G (microtask )-> is_cancelled = true;
2070
- zend_gc_collect_cycles_microtask_dtor (GC_G (microtask ));
2071
+ zend_async_microtask_t * microtask = GC_G (microtask );
2072
+ GC_G (microtask ) = NULL ;
2073
+ microtask -> is_cancelled = true;
2074
+ ZEND_ASYNC_MICROTASK_RELEASE (microtask );
2071
2075
}
2072
2076
2073
2077
if (GC_G (gc_stack ) != NULL ) {
You can’t perform that action at this time.
0 commit comments