[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [kdev-ruby/gsoc] duchain/builders: Obtain duchain r/w lock before adding module mixin to the module
From:       Alexander Dymo <adymo () kdevelop ! org>
Date:       2012-07-12 6:25:07
Message-ID: 20120712062507.12103A6094 () git ! kde ! org
[Download RAW message or body]

Git commit 0b171abe1c9806cd5c3f981966319350580ab85a by Alexander Dymo.
Committed on 12/07/2012 at 08:21.
Pushed by dymo into branch 'gsoc'.

Obtain duchain r/w lock before adding module mixin to the module declaration

M  +1    -0    duchain/builders/declarationbuilder.cpp

http://commits.kde.org/kdev-ruby/0b171abe1c9806cd5c3f981966319350580ab85a

diff --git a/duchain/builders/declarationbuilder.cpp b/duchain/builders/declarationbuilder.cpp
index 75bfc9d..24a9b46 100644
--- a/duchain/builders/declarationbuilder.cpp
+++ b/duchain/builders/declarationbuilder.cpp
@@ -732,6 +732,7 @@ void DeclarationBuilder::registerModuleMixin(ModuleDeclaration *decl, bool inclu
     if (lastClassModule) {
         ModuleDeclaration *current = dynamic_cast<ModuleDeclaration *>(lastClassModule);
         if (current) {
+            DUChainWriteLocker lock(DUChain::lock());
             ModuleMixin mixin;
             mixin.included = include;
             mixin.module = decl->indexedType();
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic