diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2019-03-18 10:31:10 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2019-03-18 09:56:45 +0000 |
commit | 11d01e3b74c84e465246a8f164b3f3b8ff92d8a4 (patch) | |
tree | 4be7398ef6a2c2d716f3f5de100144e30181d7ab /src/qdoc/qmlvisitor.h | |
parent | f1391564f6119973f46f0792b77fa65210ef00ae (diff) | |
download | qttools-11d01e3b74c84e465246a8f164b3f3b8ff92d8a4.tar.gz |
Handle recursion depth errors when parsing JavaScript
Implementations of QQmlJS::AST::Visitor are required to do so.
Fixes: QTBUG-74510
Change-Id: I061240f15ce082a05dd7829d225a5bfc3edd896a
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qdoc/qmlvisitor.h')
-rw-r--r-- | src/qdoc/qmlvisitor.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/qdoc/qmlvisitor.h b/src/qdoc/qmlvisitor.h index 321819457..6e73171dc 100644 --- a/src/qdoc/qmlvisitor.h +++ b/src/qdoc/qmlvisitor.h @@ -92,6 +92,9 @@ public: bool visit(QQmlJS::AST::UiQualifiedId *) override; void endVisit(QQmlJS::AST::UiQualifiedId *) override; + void throwRecursionDepthError(); + bool hasError() const; + private: QString getFullyQualifiedId(QQmlJS::AST::UiQualifiedId *id); QQmlJS::AST::SourceLocation precedingComment(quint32 offset) const; @@ -112,6 +115,7 @@ private: QSet<QString> topics_; QSet<quint32> usedComments; Aggregate *current; + bool hasRecursionDepthError = false; }; #endif |