зеркало из https://github.com/mozilla/pjs.git
Short circuit auto-detect logic (cuz it doesn't work here)
This commit is contained in:
Родитель
a4c4e69740
Коммит
4f64885dcd
|
@ -474,6 +474,8 @@ PRInt32 nsParser::Parse(fstream& aStream,PRBool aVerifyEnabled){
|
|||
CParserContext* pc=new CParserContext(new CScanner(kUnknownFilename,aStream,PR_FALSE),&aStream,0);
|
||||
PushContext(*pc);
|
||||
|
||||
pc->mSourceType="text/html";
|
||||
|
||||
mParserContext->mScanner->Eof();
|
||||
if(eValidDetect==AutoDetectContentType(mParserContext->mScanner->GetBuffer(),
|
||||
mParserContext->mSourceType)) {
|
||||
|
|
|
@ -474,6 +474,8 @@ PRInt32 nsParser::Parse(fstream& aStream,PRBool aVerifyEnabled){
|
|||
CParserContext* pc=new CParserContext(new CScanner(kUnknownFilename,aStream,PR_FALSE),&aStream,0);
|
||||
PushContext(*pc);
|
||||
|
||||
pc->mSourceType="text/html";
|
||||
|
||||
mParserContext->mScanner->Eof();
|
||||
if(eValidDetect==AutoDetectContentType(mParserContext->mScanner->GetBuffer(),
|
||||
mParserContext->mSourceType)) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче