mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 13:21:05 +00:00
Bug 1748146 - Return early in AbortSignal::SignalAbort r=smaug
Currently only AbortSignalImpl::SignalAbort returns early. Both can be called directly, so both should return early. Currently not really testable since this is only problematic in dom/streams and it's still hidden by a build flag. Differential Revision: https://phabricator.services.mozilla.com/D135278
This commit is contained in:
parent
bb0b1417c3
commit
182baf5159
@ -152,6 +152,11 @@ void AbortSignal::ThrowIfAborted(JSContext* aCx, ErrorResult& aRv) {
|
||||
|
||||
// https://dom.spec.whatwg.org/#abortsignal-signal-abort
|
||||
void AbortSignal::SignalAbort(JS::Handle<JS::Value> aReason) {
|
||||
// Step 1, in case "signal abort" algorithm is called directly
|
||||
if (Aborted()) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Steps 1-4.
|
||||
AbortSignalImpl::SignalAbort(aReason);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user