Bug 1207312: P1. Prevent crash when more than one promise is rejected. r=bholley

This commit is contained in:
Jean-Yves Avenard 2015-09-30 14:02:48 +10:00
parent fa1c3b9ee9
commit 5f26c3d862

View File

@ -237,6 +237,11 @@ private:
void Reject(const RejectValueType& aRejectValue)
{
if (!mPromise) {
// Already rejected.
return;
}
mPromise->Reject(aRejectValue, __func__);
mPromise = nullptr;
mResolveValues.Clear();