fix for bug 132681
r=harishd, sr=jst, a=scc performance fix - stop scanning files that are known to be XML for html-like text git-svn-id: svn://10.0.0.236/trunk@117373 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -341,7 +341,17 @@ CNavDTD::CanParse(CParserContext& aParserContext,
|
||||
}
|
||||
else if(PR_TRUE==aParserContext.mMimeType.Equals(NS_LITERAL_CSTRING(kTextJSContentType))) {
|
||||
result=ePrimaryDetect;
|
||||
}
|
||||
}
|
||||
// do this for XML-based content-types so that we don't fall back
|
||||
// to BufferContainsHTML() for known content types
|
||||
// see bug 132681
|
||||
// this will be cleaned up after moz 1.0 -alecf
|
||||
else if (aParserContext.mMimeType.Equals(NS_LITERAL_CSTRING(kRDFTextContentType)) ||
|
||||
aParserContext.mMimeType.Equals(NS_LITERAL_CSTRING(kXULTextContentType)) ||
|
||||
aParserContext.mMimeType.Equals(NS_LITERAL_CSTRING(kXMLTextContentType)) ||
|
||||
aParserContext.mMimeType.Equals(NS_LITERAL_CSTRING(kXMLApplicationContentType))) {
|
||||
result=eUnknownDetect;
|
||||
}
|
||||
else {
|
||||
//otherwise, look into the buffer to see if you recognize anything...
|
||||
PRBool theBufHasXML=PR_FALSE;
|
||||
|
||||
@@ -341,7 +341,17 @@ CNavDTD::CanParse(CParserContext& aParserContext,
|
||||
}
|
||||
else if(PR_TRUE==aParserContext.mMimeType.Equals(NS_LITERAL_CSTRING(kTextJSContentType))) {
|
||||
result=ePrimaryDetect;
|
||||
}
|
||||
}
|
||||
// do this for XML-based content-types so that we don't fall back
|
||||
// to BufferContainsHTML() for known content types
|
||||
// see bug 132681
|
||||
// this will be cleaned up after moz 1.0 -alecf
|
||||
else if (aParserContext.mMimeType.Equals(NS_LITERAL_CSTRING(kRDFTextContentType)) ||
|
||||
aParserContext.mMimeType.Equals(NS_LITERAL_CSTRING(kXULTextContentType)) ||
|
||||
aParserContext.mMimeType.Equals(NS_LITERAL_CSTRING(kXMLTextContentType)) ||
|
||||
aParserContext.mMimeType.Equals(NS_LITERAL_CSTRING(kXMLApplicationContentType))) {
|
||||
result=eUnknownDetect;
|
||||
}
|
||||
else {
|
||||
//otherwise, look into the buffer to see if you recognize anything...
|
||||
PRBool theBufHasXML=PR_FALSE;
|
||||
|
||||
Reference in New Issue
Block a user