2011-01-19 Andrey Kosyakov <caseq@chromium.org>
authorcaseq@chromium.org <caseq@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 19 Jan 2011 11:37:34 +0000 (11:37 +0000)
committercaseq@chromium.org <caseq@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 19 Jan 2011 11:37:34 +0000 (11:37 +0000)
        Reviewed by Pavel Feldman.

        Web Inspector: [Extensions API] delete pending callback from callback map before invoking it
        https://bugs.webkit.org/show_bug.cgi?id=52707

        * inspector/front-end/ExtensionAPI.js:
        (WebInspector.injectedExtensionAPI.ExtensionServerClient.prototype._onCallback):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@76109 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/inspector/front-end/ExtensionAPI.js

index cd1b927..7dfe09b 100644 (file)
@@ -1,3 +1,13 @@
+2011-01-19  Andrey Kosyakov  <caseq@chromium.org>
+
+        Reviewed by Pavel Feldman.
+
+        Web Inspector: [Extensions API] delete pending callback from callback map before invoking it
+        https://bugs.webkit.org/show_bug.cgi?id=52707
+
+        * inspector/front-end/ExtensionAPI.js:
+        (WebInspector.injectedExtensionAPI.ExtensionServerClient.prototype._onCallback):
+
 2011-01-19  Levi Weintraub  <leviw@google.com>
 
         Reviewed by Ryosuke Niwa.
index a9a2423..b10452d 100644 (file)
@@ -450,8 +450,9 @@ ExtensionServerClient.prototype = {
     _onCallback: function(request)
     {
         if (request.requestId in this._callbacks) {
-            this._callbacks[request.requestId](request.result);
+            var callback = this._callbacks[request.requestId];
             delete this._callbacks[request.requestId];
+            callback(request.result);
         }
     },