ContextBrowserPlugin: remove redundant DUChain read locks
DUChain read locks are recursive, so this commit does not fix anything, only improves performance. The removed locks were redundant because: 1. ContextBrowserPlugin::findDeclaration() is called only from ContextBrowserPlugin::updateForView() while holding DUChain::lock(). 2. ContextBrowserPlugin::switchUse() acquires DUChain::lock() almost at the beginning => no need to acquire it again below. Michael Swan originally proposed similar changes in https://phabricator.kde.org/D22182 along with a fix for Bug 358787. Jonathan L. Verner reinvented the same fix, but for Bug 416714, in the parent of this commit. This commit modifies and applies the remaining fixes from the Phabricator review. The Phabricator review's summary contains: "There were two paths which needed a lock added given my change, so this change set should not cause any regression on bug #386901." As explained at the top of this commit message, the moved/removed locks were just redundant, and so removing them is unrelated to the bug fix.
Please register or sign in to comment