Bug 1226144 - Free sessionId after using it. r=selin

This commit is contained in:
chunminchang 2015-11-26 02:39:00 +01:00
parent 774b0d2e97
commit 2668b676c8

View File

@ -254,8 +254,11 @@ PresentationIPCService::NotifyReceiverReady(const nsAString& aSessionId,
mRespondingSessionIds.Put(aWindowId, new nsAutoString(aSessionId));
mRespondingWindowIds.Put(aSessionId, aWindowId);
mCallback = nullptr;
NS_WARN_IF(!sPresentationChild->SendNotifyReceiverReady(nsAutoString(aSessionId)));
// Release mCallback after using aSessionId
// because aSessionId is held by mCallback.
mCallback = nullptr;
return NS_OK;
}