#QUALITY by cg
authorClaus Gittinger <cg@exept.de>
Thu, 26 Jul 2018 22:35:39 +0200
changeset 8433 944d26b7640d
parent 8432 05da219b0d50
child 8434 6637134c62b6
#QUALITY by cg class: WindowGroup changed: #executePostEventHooksFor: #executePreEventHooksFor: enumerate hooks in a copy (in case someone adds/removes hooks inside)
WindowGroup.st
--- a/WindowGroup.st	Sun Jul 22 22:35:27 2018 +0200
+++ b/WindowGroup.st	Thu Jul 26 22:35:39 2018 +0200
@@ -1583,7 +1583,7 @@
         postEventHook processEvent:anEvent
     ].
     postEventHooks notNil ifTrue:[
-        postEventHooks do:[:eachHook |
+        postEventHooks copy do:[:eachHook |
             eachHook isBlock ifTrue:[
                 eachHook value:anEvent
             ] ifFalse:[
@@ -1591,6 +1591,8 @@
             ]
         ]
     ].
+
+    "Modified: / 26-07-2018 / 22:35:02 / Claus Gittinger"
 !
 
 executePreEventHooksFor:anEvent
@@ -1604,7 +1606,7 @@
         (preEventHook processEvent:anEvent) ifTrue:[ ^ true ].
     ].
     preEventHooks notNil ifTrue:[
-        preEventHooks do:[:eachHook |
+        preEventHooks copy do:[:eachHook |
             "/ can only be nil if changed, while enumerating...
             eachHook notNil ifTrue:[
                 eachHook isBlock ifTrue:[
@@ -1618,6 +1620,7 @@
     ^ false
 
     "Modified: / 28-07-2010 / 03:34:33 / cg"
+    "Modified: / 26-07-2018 / 22:34:28 / Claus Gittinger"
 !
 
 lastEvent