we need to watch the error code of content type
git-svn-id: svn://10.0.0.236/trunk@37493 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -1058,7 +1058,10 @@ nsresult nsParser::OnStartBinding(nsIURI* aURL, const char *aSourceType)
|
||||
rv = aContext->QueryInterface(nsIChannel::GetIID(), (void**)&channel);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
char* contentType;
|
||||
(void)channel->GetContentType(&contentType); // XXX ignore error?
|
||||
rv = channel->GetContentType(&contentType);
|
||||
if (NS_FAILED(rv)) {
|
||||
NS_ASSERTION(contentType, "parser needs a content type to find a dtd");
|
||||
}
|
||||
mParserContext->mSourceType = contentType;
|
||||
nsCRT::free(contentType);
|
||||
NS_RELEASE(channel);
|
||||
|
||||
Reference in New Issue
Block a user