зеркало из https://github.com/mozilla/pjs.git
Don't crash if responseText is gotten when we have no channel. Bug 289156,
r+sr=jst, a=chofmann
This commit is contained in:
Родитель
0d9afc5e97
Коммит
c076641412
|
@ -489,6 +489,11 @@ nsXMLHttpRequest::DetectCharset(nsACString& aCharset)
|
|||
nsCOMPtr<nsIChannel> channel(do_QueryInterface(mReadRequest));
|
||||
if (!channel) {
|
||||
channel = mChannel;
|
||||
if (!channel) {
|
||||
// There will be no mChannel when we got a necko error in
|
||||
// OnStopRequest or if we were never sent.
|
||||
return NS_ERROR_NOT_AVAILABLE;
|
||||
}
|
||||
}
|
||||
|
||||
rv = channel->GetContentCharset(charsetVal);
|
||||
|
|
Загрузка…
Ссылка в новой задаче