mirror of
https://github.com/oven-sh/bun
synced 2026-02-09 10:28:47 +00:00
Fix bug causing AbortSignal to sometimes collect too early (#16748)
This commit is contained in:
@@ -195,6 +195,7 @@ void AbortSignal::cleanNativeBindings(void* ref)
|
||||
});
|
||||
|
||||
std::exchange(m_native_callbacks, WTFMove(callbacks));
|
||||
this->eventListenersDidChange();
|
||||
}
|
||||
|
||||
// https://dom.spec.whatwg.org/#abortsignal-follow
|
||||
@@ -218,7 +219,7 @@ void AbortSignal::signalFollow(AbortSignal& signal)
|
||||
|
||||
void AbortSignal::eventListenersDidChange()
|
||||
{
|
||||
m_hasAbortEventListener = hasEventListeners(eventNames().abortEvent);
|
||||
m_hasAbortEventListener = hasEventListeners(eventNames().abortEvent) or !m_native_callbacks.isEmpty();
|
||||
}
|
||||
|
||||
uint32_t AbortSignal::addAbortAlgorithmToSignal(AbortSignal& signal, Ref<AbortAlgorithm>&& algorithm)
|
||||
|
||||
Reference in New Issue
Block a user