Changes between Version 2 and Version 4 of Ticket #12332


Ignore:
Timestamp:
Sep 19, 2014, 2:55:45 PM (7 years ago)
Author:
Artur Delura
Comment:

Undo manager bind events with priority 10(default). There is a chance that some plugin bind same event with same priority. So now callback execution depends on order of binding callbacks to events. There is a chance that callback in undo plugin is called first and then other callback is called and stop() event. In this situation our callback shouldn't be called. To avoid such situation we lower priorities of callbacks in undo plugin - just to be sure that stopping event in other part of code prevent our callback execution.

How about:

I think we could see at this problem from global perspective. This problem could be handled in events library. I.e. throw an error/warning when there are two callbacks binded with the same priority, and one of them stop() event execution. Of course only in development version.

Or to provide extra flag which inform that some callback can stop() event. And then this callbacks will be handled first.

Changes in branch:t/12332.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #12332

    • Property Status changed from confirmed to review
    • Property Owner set to Artur Delura
  • Ticket #12332 – Description

    v2 v4  
    44
    55The listeners should be added with low priorities (999), so they are always handled at the end - if nothing else handled them.
     6
     7Changes in branch:t/12332.
© 2003 – 2021 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy