forked from qt-creator/qt-creator
QmlJSEditor: Prevent an infinite parsing loop with invalid qml/js files.
Reviewed-by: Erik Verbruggen
This commit is contained in:
@@ -1364,6 +1364,7 @@ SemanticInfo SemanticHighlighter::semanticInfo(const Source &source)
|
|||||||
if (! doc) {
|
if (! doc) {
|
||||||
snapshot = source.snapshot;
|
snapshot = source.snapshot;
|
||||||
doc = snapshot.documentFromSource(source.code, source.fileName);
|
doc = snapshot.documentFromSource(source.code, source.fileName);
|
||||||
|
doc->setDocumentRevision(source.revision);
|
||||||
doc->parse();
|
doc->parse();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user