Bug 996508 - Don't deliver async messages which were already received. r=smaug

This commit is contained in:
Henry Chang 2014-04-16 11:38:15 +08:00
Родитель d975eff099
Коммит 8fc086c1a7
1 изменённых файлов: 9 добавлений и 2 удалений

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

@ -1774,6 +1774,7 @@ public:
JS::Handle<JSObject *> aCpows,
nsIPrincipal* aPrincipal)
: nsSameProcessAsyncMessageBase(aCx, aMessage, aData, aCpows, aPrincipal)
, mDelivered(false)
{
}
@ -1782,10 +1783,16 @@ public:
if (nsFrameMessageManager::sPendingSameProcessAsyncMessages) {
nsFrameMessageManager::sPendingSameProcessAsyncMessages->RemoveElement(this);
}
if (!mDelivered) {
mDelivered = true;
nsFrameMessageManager* ppm = nsFrameMessageManager::sSameProcessParentManager;
ReceiveMessage(static_cast<nsIContentFrameMessageManager*>(ppm), ppm);
}
return NS_OK;
}
private:
bool mDelivered;
};
/**