diff options
author | Moonchild <moonchild@palemoon.org> | 2020-08-31 05:54:39 +0000 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2020-08-31 05:54:39 +0000 |
commit | a6f632714fcb1be3dd00b0fc76fbf6bfc693155b (patch) | |
tree | b04c82f9af4a0d288a6d4350d774ad8fe6dac903 /dom/abort/AbortSignal.cpp | |
parent | 2ed0607c747b21cadaf7401d4ba706097578e74d (diff) | |
parent | b28effe2ea93e43e362f7ce263d23b55adcb6da7 (diff) | |
download | UXP-a6f632714fcb1be3dd00b0fc76fbf6bfc693155b.tar UXP-a6f632714fcb1be3dd00b0fc76fbf6bfc693155b.tar.gz UXP-a6f632714fcb1be3dd00b0fc76fbf6bfc693155b.tar.lz UXP-a6f632714fcb1be3dd00b0fc76fbf6bfc693155b.tar.xz UXP-a6f632714fcb1be3dd00b0fc76fbf6bfc693155b.zip |
Merge branch 'redwood' into releaseRELBASE_20200831
Diffstat (limited to 'dom/abort/AbortSignal.cpp')
-rw-r--r-- | dom/abort/AbortSignal.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/dom/abort/AbortSignal.cpp b/dom/abort/AbortSignal.cpp index 20f36d2ab..7ee6c49a9 100644 --- a/dom/abort/AbortSignal.cpp +++ b/dom/abort/AbortSignal.cpp @@ -56,9 +56,16 @@ AbortSignal::Aborted() const void AbortSignal::Abort() { - MOZ_ASSERT(!mAborted); + // Re-entrancy guard + if (mAborted) { + return; + } mAborted = true; + // We might be deleted as a result of aborting a follower, so ensure we + // stay alive until all followers have been aborted. + RefPtr<AbortSignal> pinThis = this; + // Let's inform the followers. for (uint32_t i = 0; i < mFollowers.Length(); ++i) { mFollowers[i]->Aborted(); |