mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 11:25:00 +00:00
Fix for bug 7401. Output an error when a URL load fails.
This commit is contained in:
parent
aad43df1e7
commit
c62e745099
@ -733,9 +733,18 @@ CSSLoaderImpl::DidLoadStyle(nsIUnicharStreamLoader* aLoader,
|
||||
Cleanup(key, aLoadData);
|
||||
}
|
||||
}
|
||||
else { // load failed, cleanup
|
||||
else { // load failed, cleanup
|
||||
URLKey key(aLoadData->mURL);
|
||||
Cleanup(key, aLoadData);
|
||||
|
||||
// Dump error message to console.
|
||||
const char *url;
|
||||
if (nsnull != aLoadData->mURL)
|
||||
aLoadData->mURL->GetSpec(&url);
|
||||
else
|
||||
url = "";
|
||||
cerr << "CSSLoaderImpl::DidLoadStyle: Load of URL '" << url
|
||||
<< "' failed. Error code: " << NS_ERROR_GET_CODE(aStatus) << "\n";
|
||||
}
|
||||
|
||||
}
|
||||
@ -1193,6 +1202,16 @@ CSSLoaderImpl::LoadAgentSheet(nsIURL* aURL,
|
||||
}
|
||||
NS_RELEASE(in);
|
||||
}
|
||||
else {
|
||||
// Dump an error message to the console
|
||||
const char *url;
|
||||
if (nsnull != aURL)
|
||||
aURL->GetSpec(&url);
|
||||
else
|
||||
url = "";
|
||||
cerr << "CSSLoaderImpl::LoadAgentSheet: Load of URL '" << url
|
||||
<< "' failed. Error code: " << NS_ERROR_GET_CODE(result) << "\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
|
@ -733,9 +733,18 @@ CSSLoaderImpl::DidLoadStyle(nsIUnicharStreamLoader* aLoader,
|
||||
Cleanup(key, aLoadData);
|
||||
}
|
||||
}
|
||||
else { // load failed, cleanup
|
||||
else { // load failed, cleanup
|
||||
URLKey key(aLoadData->mURL);
|
||||
Cleanup(key, aLoadData);
|
||||
|
||||
// Dump error message to console.
|
||||
const char *url;
|
||||
if (nsnull != aLoadData->mURL)
|
||||
aLoadData->mURL->GetSpec(&url);
|
||||
else
|
||||
url = "";
|
||||
cerr << "CSSLoaderImpl::DidLoadStyle: Load of URL '" << url
|
||||
<< "' failed. Error code: " << NS_ERROR_GET_CODE(aStatus) << "\n";
|
||||
}
|
||||
|
||||
}
|
||||
@ -1193,6 +1202,16 @@ CSSLoaderImpl::LoadAgentSheet(nsIURL* aURL,
|
||||
}
|
||||
NS_RELEASE(in);
|
||||
}
|
||||
else {
|
||||
// Dump an error message to the console
|
||||
const char *url;
|
||||
if (nsnull != aURL)
|
||||
aURL->GetSpec(&url);
|
||||
else
|
||||
url = "";
|
||||
cerr << "CSSLoaderImpl::LoadAgentSheet: Load of URL '" << url
|
||||
<< "' failed. Error code: " << NS_ERROR_GET_CODE(result) << "\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
|
@ -733,9 +733,18 @@ CSSLoaderImpl::DidLoadStyle(nsIUnicharStreamLoader* aLoader,
|
||||
Cleanup(key, aLoadData);
|
||||
}
|
||||
}
|
||||
else { // load failed, cleanup
|
||||
else { // load failed, cleanup
|
||||
URLKey key(aLoadData->mURL);
|
||||
Cleanup(key, aLoadData);
|
||||
|
||||
// Dump error message to console.
|
||||
const char *url;
|
||||
if (nsnull != aLoadData->mURL)
|
||||
aLoadData->mURL->GetSpec(&url);
|
||||
else
|
||||
url = "";
|
||||
cerr << "CSSLoaderImpl::DidLoadStyle: Load of URL '" << url
|
||||
<< "' failed. Error code: " << NS_ERROR_GET_CODE(aStatus) << "\n";
|
||||
}
|
||||
|
||||
}
|
||||
@ -1193,6 +1202,16 @@ CSSLoaderImpl::LoadAgentSheet(nsIURL* aURL,
|
||||
}
|
||||
NS_RELEASE(in);
|
||||
}
|
||||
else {
|
||||
// Dump an error message to the console
|
||||
const char *url;
|
||||
if (nsnull != aURL)
|
||||
aURL->GetSpec(&url);
|
||||
else
|
||||
url = "";
|
||||
cerr << "CSSLoaderImpl::LoadAgentSheet: Load of URL '" << url
|
||||
<< "' failed. Error code: " << NS_ERROR_GET_CODE(result) << "\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
|
Loading…
Reference in New Issue
Block a user