mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 662554 - Make websocketestablishedconnection getinterface and close() check mOwner != nsnull r=biesi
--HG-- extra : rebase_source : 2a5e0df5d61f52445b2db8e08431df6987a07e5c
This commit is contained in:
parent
aa7b61a5eb
commit
20b80a25e4
@ -314,6 +314,7 @@ nsWebSocketEstablishedConnection::PrintErrorOnConsole(const char *aBundleURI,
|
||||
PRUint32 aFormatStringsLen)
|
||||
{
|
||||
NS_ABORT_IF_FALSE(NS_IsMainThread(), "Not running on main thread");
|
||||
NS_ABORT_IF_FALSE(mOwner, "No owner");
|
||||
|
||||
nsresult rv;
|
||||
|
||||
@ -365,6 +366,8 @@ nsresult
|
||||
nsWebSocketEstablishedConnection::Close()
|
||||
{
|
||||
NS_ABORT_IF_FALSE(NS_IsMainThread(), "Not running on main thread");
|
||||
if (!mOwner)
|
||||
return NS_OK;
|
||||
|
||||
// Disconnect() can release this object, so we keep a
|
||||
// reference until the end of the method
|
||||
@ -458,6 +461,8 @@ nsresult
|
||||
nsWebSocketEstablishedConnection::UpdateMustKeepAlive()
|
||||
{
|
||||
NS_ABORT_IF_FALSE(NS_IsMainThread(), "Not running on main thread");
|
||||
NS_ABORT_IF_FALSE(mOwner, "No owner");
|
||||
|
||||
mOwner->UpdateMustKeepAlive();
|
||||
return NS_OK;
|
||||
}
|
||||
@ -572,6 +577,9 @@ nsWebSocketEstablishedConnection::GetInterface(const nsIID &aIID,
|
||||
{
|
||||
NS_ABORT_IF_FALSE(NS_IsMainThread(), "Not running on main thread");
|
||||
|
||||
if (!mOwner)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
if (aIID.Equals(NS_GET_IID(nsIAuthPrompt)) ||
|
||||
aIID.Equals(NS_GET_IID(nsIAuthPrompt2))) {
|
||||
nsresult rv;
|
||||
|
Loading…
Reference in New Issue
Block a user