Bug 639830: WyciwygChannelChild not thorough about checking for cancellation. r=jduell

This commit is contained in:
Sreenidhi Nair 2011-09-09 15:50:03 -07:00
Родитель 3df9cf0f35
Коммит b55d046a2b
1 изменённых файлов: 18 добавлений и 6 удалений

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

@ -117,6 +117,9 @@ WyciwygChannelParent::RecvAsyncOpen(const IPC::URI& aOriginal,
LOG(("WyciwygChannelParent RecvAsyncOpen [this=%x]\n", this));
if (!mChannel)
return true;
nsresult rv;
rv = mChannel->SetOriginalURI(original);
@ -137,14 +140,18 @@ WyciwygChannelParent::RecvAsyncOpen(const IPC::URI& aOriginal,
bool
WyciwygChannelParent::RecvWriteToCacheEntry(const nsString& data)
{
mChannel->WriteToCacheEntry(data);
if (mChannel)
mChannel->WriteToCacheEntry(data);
return true;
}
bool
WyciwygChannelParent::RecvCloseCacheEntry(const nsresult& reason)
{
mChannel->CloseCacheEntry(reason);
if (mChannel)
mChannel->CloseCacheEntry(reason);
return true;
}
@ -152,16 +159,21 @@ bool
WyciwygChannelParent::RecvSetCharsetAndSource(const PRInt32& aCharsetSource,
const nsCString& aCharset)
{
mChannel->SetCharsetAndSource(aCharsetSource, aCharset);
if (mChannel)
mChannel->SetCharsetAndSource(aCharsetSource, aCharset);
return true;
}
bool
WyciwygChannelParent::RecvSetSecurityInfo(const nsCString& aSecurityInfo)
{
nsCOMPtr<nsISupports> securityInfo;
NS_DeserializeObject(aSecurityInfo, getter_AddRefs(securityInfo));
mChannel->SetSecurityInfo(securityInfo);
if (mChannel) {
nsCOMPtr<nsISupports> securityInfo;
NS_DeserializeObject(aSecurityInfo, getter_AddRefs(securityInfo));
mChannel->SetSecurityInfo(securityInfo);
}
return true;
}