forked from qt-creator/qt-creator
QmlJS: Share Context.
Previously Context was not entirely thread safe and had to be copied locally. Now it is thread safe and its lifetime managed by QSharedPointer. The non-safe parts were moved into ScopeChain in a previous commit. Change-Id: I851a93de85cbd6391dbea0fe33b011e2e093addb Reviewed-on: http://codereview.qt.nokia.com/1695 Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com>
This commit is contained in:
@@ -54,7 +54,7 @@ class QMLJS_EXPORT Check: protected AST::Visitor
|
||||
|
||||
public:
|
||||
// prefer taking root scope chain?
|
||||
Check(Document::Ptr doc, const Interpreter::Context *context);
|
||||
Check(Document::Ptr doc, const Interpreter::ContextPtr &context);
|
||||
virtual ~Check();
|
||||
|
||||
QList<DiagnosticMessage> operator()();
|
||||
@@ -128,7 +128,7 @@ private:
|
||||
|
||||
Document::Ptr _doc;
|
||||
|
||||
Interpreter::Context _context;
|
||||
Interpreter::ContextPtr _context;
|
||||
Interpreter::ScopeChain _scopeChain;
|
||||
ScopeBuilder _scopeBuilder;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user