qmljs: restructure duchain locking to prevent deadlocks

Review Request #128762 - Created Aug. 25, 2016 and discarded - Latest diff uploaded

Information
Sven Brauch
kdevelop
367825
Reviewers
kdevelop
kfunk

We must not hold a duchain lock when contextOfFile() is called. That
might try to add something to the background parser queue, which locks
the background parser mutex; then both locks are held, which causes
deadlocks.

Opened some test project, no crashes, no freezes, and the (I think) reason for the freeze is gone.

Loading...