Bug 1342831 - devirtualize AssertIsDead().
MozReview-Commit-ID: 9dNDiTfwlLR
--- a/xpcom/threads/MozPromise.h
+++ b/xpcom/threads/MozPromise.h
@@ -288,17 +288,16 @@ public:
}
return holder->Promise();
}
class Request : public MozPromiseRefcountable
{
public:
virtual void Disconnect() = 0;
- virtual void AssertIsDead() = 0;
protected:
Request() : mComplete(false), mDisconnected(false) {}
virtual ~Request() {}
bool mComplete;
bool mDisconnected;
};
@@ -357,17 +356,17 @@ protected:
#ifdef PROMISE_DEBUG
~ThenValueBase()
{
mMagic1 = 0;
mMagic2 = 0;
}
#endif
- void AssertIsDead() override
+ void AssertIsDead()
{
PROMISE_ASSERT(mMagic1 == sMagic && mMagic2 == sMagic);
// We want to assert that this ThenValues is dead - that is to say, that
// there are no consumers waiting for the result. In the case of a normal
// ThenValue, we check that it has been disconnected, which is the way
// that the consumer signals that it no longer wishes to hear about the
// result. If this ThenValue has a completion promise (which is mutually
// exclusive with being disconnectable), we recursively assert that every