Bug 1191495 - Relax PushManager callback assertions. r=kitcambridge

--HG--
extra : commitid : E9vbMNHj3TZ
extra : rebase_source : 816d8318a127beec799b648640057e21f77c647b
This commit is contained in:
Nikhil Marathe 2015-08-05 13:21:08 -07:00
Родитель 9c77fa0bcd
Коммит 4f39cda39b
1 изменённых файлов: 2 добавлений и 16 удалений

Просмотреть файл

@ -286,7 +286,6 @@ public:
explicit WorkerUnsubscribeResultCallback(PromiseWorkerProxy* aProxy)
: mProxy(aProxy)
, mCallbackCalled(false)
{
AssertIsOnMainThread();
}
@ -295,7 +294,6 @@ public:
OnUnsubscribe(nsresult aStatus, bool aSuccess) override
{
AssertIsOnMainThread();
mCallbackCalled = true;
if (!mProxy) {
return NS_OK;
}
@ -319,14 +317,9 @@ public:
private:
~WorkerUnsubscribeResultCallback()
{
// Enforces that UnsubscribeRunnable uses the callback for error
// reporting once it creates the callback.
MOZ_ASSERT(mCallbackCalled);
}
{}
nsRefPtr<PromiseWorkerProxy> mProxy;
DebugOnly<bool> mCallbackCalled;
};
NS_IMPL_ISUPPORTS(WorkerUnsubscribeResultCallback, nsIUnsubscribeResultCallback)
@ -477,14 +470,12 @@ public:
const nsAString& aScope)
: mProxy(aProxy)
, mScope(aScope)
, mCallbackCalled(false)
{}
NS_IMETHOD
OnPushEndpoint(nsresult aStatus, const nsAString& aEndpoint) override
{
AssertIsOnMainThread();
mCallbackCalled = true;
if (!mProxy) {
return NS_OK;
@ -508,16 +499,11 @@ public:
protected:
~GetSubscriptionCallback()
{
// Enforces that GetSubscriptionRunnable uses the callback for error
// reporting once it creates the callback.
MOZ_ASSERT(mCallbackCalled);
}
{}
private:
nsRefPtr<PromiseWorkerProxy> mProxy;
nsString mScope;
DebugOnly<bool> mCallbackCalled;
};
NS_IMPL_ISUPPORTS(GetSubscriptionCallback, nsIPushEndpointCallback)