Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 359565 - Editor "Destroy" Listener not called when previous listener removes itself
Summary: Editor "Destroy" Listener not called when previous listener removes itself
Status: RESOLVED FIXED
Alias: None
Product: Orion
Classification: ECD
Component: Editor (show other bugs)
Version: 0.3   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: 0.3 RC1   Edit
Assignee: Silenio Quarti CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-30 09:49 EDT by Silenio Quarti CLA
Modified: 2011-10-11 15:40 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Silenio Quarti CLA 2011-09-30 09:49:08 EDT
If a listener of a event in the editor removes itself during the event callback, the listener that follows in the sequence of listeners is not called.

The problem is that the array of listeners is modified while iteration over it.
Comment 1 Silenio Quarti CLA 2011-09-30 12:18:13 EDT
Fixed 
http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=8b2083e13cf92fb9ee6433d9d3afef4a35935213

http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=4393770fec3d11da18208397a5eb1bc74832dff3

Note that the first patch did not fix two problems:

- listeners added during an event would not run
- listeners removed during an event could still still run