mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1161742 - Hoist part of ResolveOrReject into ThenValueBase. r=jww
This commit is contained in:
parent
956fc5c4d5
commit
9e02c8acb6
@ -198,7 +198,18 @@ protected:
|
||||
}
|
||||
|
||||
protected:
|
||||
virtual void DoResolveOrReject(ResolveOrRejectValue& aValue) = 0;
|
||||
virtual void DoResolveOrRejectInternal(ResolveOrRejectValue& aValue) = 0;
|
||||
|
||||
void DoResolveOrReject(ResolveOrRejectValue& aValue)
|
||||
{
|
||||
Consumer::mComplete = true;
|
||||
if (Consumer::mDisconnected) {
|
||||
PROMISE_LOG("ThenValue::DoResolveOrReject disconnected - bailing out [this=%p]", this);
|
||||
return;
|
||||
}
|
||||
|
||||
DoResolveOrRejectInternal(aValue);
|
||||
}
|
||||
|
||||
nsRefPtr<AbstractThread> mResponseTarget; // May be released on any thread.
|
||||
const char* mCallSite;
|
||||
@ -253,15 +264,8 @@ protected:
|
||||
}
|
||||
|
||||
protected:
|
||||
virtual void DoResolveOrReject(ResolveOrRejectValue& aValue) override
|
||||
virtual void DoResolveOrRejectInternal(ResolveOrRejectValue& aValue) override
|
||||
{
|
||||
Consumer::mComplete = true;
|
||||
if (Consumer::mDisconnected) {
|
||||
MOZ_ASSERT(!mThisVal);
|
||||
PROMISE_LOG("ThenValue::DoResolveOrReject disconnected - bailing out [this=%p]", this);
|
||||
return;
|
||||
}
|
||||
|
||||
if (aValue.IsResolve()) {
|
||||
InvokeCallbackMethod(mThisVal.get(), mResolveMethod, aValue.ResolveValue());
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user