dont emit error messages when sheets canceled after doc disconnect

This commit is contained in:
peterl%netscape.com 1999-06-16 06:16:53 +00:00
Родитель d074a095d6
Коммит a5e9725c84
3 изменённых файлов: 39 добавлений и 27 удалений

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

@ -748,15 +748,19 @@ CSSLoaderImpl::DidLoadStyle(nsIUnicharStreamLoader* aLoader,
Cleanup(key, aLoadData); Cleanup(key, aLoadData);
} }
} }
else { // load failed, cleanup else { // load failed or document now gone, cleanup
// Dump error message to console. if (mDocument) { // still have doc, must have failed
const char *url; // Dump error message to console.
if (nsnull != aLoadData->mURL) const char *url;
aLoadData->mURL->GetSpec(&url); if (nsnull != aLoadData->mURL) {
else aLoadData->mURL->GetSpec(&url);
url = ""; }
cerr << "CSSLoaderImpl::DidLoadStyle: Load of URL '" << url else {
<< "' failed. Error code: " << NS_ERROR_GET_CODE(aStatus) << "\n"; url = "";
}
cerr << "CSSLoaderImpl::DidLoadStyle: Load of URL '" << url
<< "' failed. Error code: " << NS_ERROR_GET_CODE(aStatus) << "\n";
}
URLKey key(aLoadData->mURL); URLKey key(aLoadData->mURL);
Cleanup(key, aLoadData); Cleanup(key, aLoadData);

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

@ -748,15 +748,19 @@ CSSLoaderImpl::DidLoadStyle(nsIUnicharStreamLoader* aLoader,
Cleanup(key, aLoadData); Cleanup(key, aLoadData);
} }
} }
else { // load failed, cleanup else { // load failed or document now gone, cleanup
// Dump error message to console. if (mDocument) { // still have doc, must have failed
const char *url; // Dump error message to console.
if (nsnull != aLoadData->mURL) const char *url;
aLoadData->mURL->GetSpec(&url); if (nsnull != aLoadData->mURL) {
else aLoadData->mURL->GetSpec(&url);
url = ""; }
cerr << "CSSLoaderImpl::DidLoadStyle: Load of URL '" << url else {
<< "' failed. Error code: " << NS_ERROR_GET_CODE(aStatus) << "\n"; url = "";
}
cerr << "CSSLoaderImpl::DidLoadStyle: Load of URL '" << url
<< "' failed. Error code: " << NS_ERROR_GET_CODE(aStatus) << "\n";
}
URLKey key(aLoadData->mURL); URLKey key(aLoadData->mURL);
Cleanup(key, aLoadData); Cleanup(key, aLoadData);

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

@ -748,15 +748,19 @@ CSSLoaderImpl::DidLoadStyle(nsIUnicharStreamLoader* aLoader,
Cleanup(key, aLoadData); Cleanup(key, aLoadData);
} }
} }
else { // load failed, cleanup else { // load failed or document now gone, cleanup
// Dump error message to console. if (mDocument) { // still have doc, must have failed
const char *url; // Dump error message to console.
if (nsnull != aLoadData->mURL) const char *url;
aLoadData->mURL->GetSpec(&url); if (nsnull != aLoadData->mURL) {
else aLoadData->mURL->GetSpec(&url);
url = ""; }
cerr << "CSSLoaderImpl::DidLoadStyle: Load of URL '" << url else {
<< "' failed. Error code: " << NS_ERROR_GET_CODE(aStatus) << "\n"; url = "";
}
cerr << "CSSLoaderImpl::DidLoadStyle: Load of URL '" << url
<< "' failed. Error code: " << NS_ERROR_GET_CODE(aStatus) << "\n";
}
URLKey key(aLoadData->mURL); URLKey key(aLoadData->mURL);
Cleanup(key, aLoadData); Cleanup(key, aLoadData);