crash when loading external JS files - bug 33029

This commit is contained in:
jbetak%netscape.com 2000-04-05 03:18:41 +00:00
Родитель 8b9369403e
Коммит 0d9901399c
2 изменённых файлов: 10 добавлений и 8 удалений

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

@ -4402,7 +4402,7 @@ HTMLContentSink::OnStreamComplete(nsIStreamLoader* aLoader,
if (stringLen) {
PRUnichar *unicodeString = nsnull;
PRInt32 unicodeLength;
PRInt32 unicodeLength = 0;
nsAutoString characterSet;
nsICharsetConverterManager *charsetConv = nsnull;
nsCOMPtr<nsIUnicodeDecoder> unicodeDecoder;
@ -4433,15 +4433,16 @@ HTMLContentSink::OnStreamComplete(nsIStreamLoader* aLoader,
if (NS_SUCCEEDED(rv)) {
mUnicodeXferBuf.SetLength(unicodeLength);
} else {
mUnicodeXferBuf.SetLength(0);
mUnicodeXferBuf.SetLength(0);
}
}
}
NS_ASSERTION(NS_SUCCEEDED(rv), "Could not convert Script input to Unicode!");
nsAutoString jsUnicodeBuffer(CBufDescriptor(unicodeString, PR_TRUE, unicodeLength+1, unicodeLength));
if (NS_OK == aStatus) {
if ((NS_OK == aStatus) && (NS_SUCCEEDED(rv))) {
nsAutoString jsUnicodeBuffer(CBufDescriptor(unicodeString, PR_TRUE, unicodeLength+1, unicodeLength));
PRBool bodyPresent = PreEvaluateScript();
//-- Merge the principal of the script file with that of the document

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

@ -4402,7 +4402,7 @@ HTMLContentSink::OnStreamComplete(nsIStreamLoader* aLoader,
if (stringLen) {
PRUnichar *unicodeString = nsnull;
PRInt32 unicodeLength;
PRInt32 unicodeLength = 0;
nsAutoString characterSet;
nsICharsetConverterManager *charsetConv = nsnull;
nsCOMPtr<nsIUnicodeDecoder> unicodeDecoder;
@ -4433,15 +4433,16 @@ HTMLContentSink::OnStreamComplete(nsIStreamLoader* aLoader,
if (NS_SUCCEEDED(rv)) {
mUnicodeXferBuf.SetLength(unicodeLength);
} else {
mUnicodeXferBuf.SetLength(0);
mUnicodeXferBuf.SetLength(0);
}
}
}
NS_ASSERTION(NS_SUCCEEDED(rv), "Could not convert Script input to Unicode!");
nsAutoString jsUnicodeBuffer(CBufDescriptor(unicodeString, PR_TRUE, unicodeLength+1, unicodeLength));
if (NS_OK == aStatus) {
if ((NS_OK == aStatus) && (NS_SUCCEEDED(rv))) {
nsAutoString jsUnicodeBuffer(CBufDescriptor(unicodeString, PR_TRUE, unicodeLength+1, unicodeLength));
PRBool bodyPresent = PreEvaluateScript();
//-- Merge the principal of the script file with that of the document