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

List:       kde-commits
Subject:    extragear/sdk/kdevplatform/language/duchain/builders
From:       David Nolden <david.nolden.kde () art-master ! de>
Date:       2010-03-19 23:41:19
Message-ID: 20100319234119.0BE3CAC860 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1105367 by zwabel:

Release the smart-lock before calling addDocumentChain. This prevents a possible \
                deadlock.
BUG: 230942

 M  +8 -6      abstractcontextbuilder.h  


--- trunk/extragear/sdk/kdevplatform/language/duchain/builders/abstractcontextbuilder.h \
#1105366:1105367 @@ -140,12 +140,14 @@
       }else
       {
 //         kDebug() << "compiling";
-        LockedSmartInterface iface = m_editor->smart();
-        top = newTopContext( iface.currentDocument()
-                                    ? SimpleRange( \
                iface.currentDocument()->documentRange() )
-                                    : SimpleRange( SimpleCursor( 0, 0 ), \
                SimpleCursor( INT_MAX, INT_MAX ) ) );
-        top->setSmartRange( m_editor->topRange( iface, \
                EditorIntegrator::DefinitionUseChain ), DocumentRangeObject::Own );
-        top->setType( DUContext::Global );
+        {
+          LockedSmartInterface iface = m_editor->smart();
+          top = newTopContext( iface.currentDocument()
+                                      ? SimpleRange( \
iface.currentDocument()->documentRange() ) +                                      : \
SimpleRange( SimpleCursor( 0, 0 ), SimpleCursor( INT_MAX, INT_MAX ) ) ); +          \
top->setSmartRange( m_editor->topRange( iface, EditorIntegrator::DefinitionUseChain \
), DocumentRangeObject::Own ); +          top->setType( DUContext::Global );
+        }
         DUChain::self()->addDocumentChain( top );
       }
       setEncountered( top );


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

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