[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.15.1-1414-gc69ee75

eric at webkit.org eric at webkit.org
Thu Oct 29 20:37:23 UTC 2009


The following commit has been merged in the webkit-1.1 branch:
commit 0ae6607bece93682f8c347ed8e32d2e9f6152f1e
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Oct 1 13:17:04 2009 +0000

    2009-10-01  Yury Semikhatsky  <yurys at chromium.org>
    
            Reviewed by Timothy Hatcher.
    
            Make a copy of listeners array before dispatching an event in
            WebInspector.Object.prototype.dispatchEventToListeners. Otherwise if current
            listener removes itself from the array next listener will be skipped.
    
            https://bugs.webkit.org/show_bug.cgi?id=29920
    
            * inspector/front-end/Object.js:
            (WebInspector.Object.prototype.dispatchEventToListeners): make a copy of listeners array before dispatching an event
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48970 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 87bc9c2..f8ebc8b 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,16 @@
+2009-10-01  Yury Semikhatsky  <yurys at chromium.org>
+
+        Reviewed by Timothy Hatcher.
+
+        Make a copy of listeners array before dispatching an event in
+        WebInspector.Object.prototype.dispatchEventToListeners. Otherwise if current
+        listener removes itself from the array next listener will be skipped.
+
+        https://bugs.webkit.org/show_bug.cgi?id=29920
+
+        * inspector/front-end/Object.js:
+        (WebInspector.Object.prototype.dispatchEventToListeners): make a copy of listeners array before dispatching an event
+
 2009-10-01  Martin Robinson  <martin.james.robinson at gmail.com>
 
         Reviewed by Xan Lopez.
diff --git a/WebCore/inspector/front-end/Object.js b/WebCore/inspector/front-end/Object.js
index 80202b0..74fb56e 100644
--- a/WebCore/inspector/front-end/Object.js
+++ b/WebCore/inspector/front-end/Object.js
@@ -67,10 +67,10 @@ WebInspector.Object.prototype = {
         }
 
         var event = {target: this, type: eventType, defaultPrevented: false};
-        event.stopPropagation = stopPropagation.bind(event);
-        event.preventDefault = preventDefault.bind(event);
+        event.stopPropagation = stopPropagation;
+        event.preventDefault = preventDefault;
 
-        var listeners = this._listeners[eventType];
+        var listeners = this._listeners[eventType].slice(0);
         for (var i = 0; i < listeners.length; ++i) {
             listeners[i].listener.call(listeners[i].thisObject, event);
             if (stoppedPropagation)

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list