mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-07 09:46:02 +02:00
Bug 511871 - CContentAssistProcessor.createContext may leak index lock
Change-Id: I828c94484c7b1594ba72551b80cd5ed6e6a8576c
This commit is contained in:
parent
d06db08a30
commit
c6955df2e2
1 changed files with 25 additions and 19 deletions
|
@ -266,6 +266,7 @@ public class CContentAssistProcessor extends ContentAssistProcessor {
|
|||
char activationChar = getActivationChar(viewer, offset);
|
||||
CContentAssistInvocationContext context =
|
||||
new CContentAssistInvocationContext(viewer, offset, fEditor, isCompletion, isAutoActivated());
|
||||
try {
|
||||
if (isCompletion && activationChar == '.' && fReplacementAutoActivationCharacters != null &&
|
||||
fReplacementAutoActivationCharacters.contains('.')) {
|
||||
IASTCompletionNode node = context.getCompletionNode();
|
||||
|
@ -290,6 +291,11 @@ public class CContentAssistProcessor extends ContentAssistProcessor {
|
|||
context = null;
|
||||
}
|
||||
}
|
||||
} catch (RuntimeException | Error e) {
|
||||
if (context != null)
|
||||
context.dispose();
|
||||
throw e;
|
||||
}
|
||||
|
||||
return context;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue