[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-10851-g50815da

loislo at chromium.org loislo at chromium.org
Wed Dec 22 18:45:06 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 6eaba5c65799fa3ad2269ff353f779cb0c550e1b
Author: loislo at chromium.org <loislo at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Dec 17 08:29:52 2010 +0000

    2010-12-17  Ilya Tikhonovsky  <loislo at chromium.org>
    
            Reviewed by Yury Semikhatsky.
    
            Web Inspector: remove unnecessary dependencies from InspectorBackendStub.
    
            InspectorBackendStub is a transport-only thing but it has dependencies with
            Callback.js and WebInspector namespace. Callback can be integrated into
            InspectorBackendStub because it is the only client.
            Without these dependencies InspectorBackendStub can be used as an API
            wrapper for Inspector Protocol.
    
            https://bugs.webkit.org/show_bug.cgi?id=51184
    
            * WebCore.gypi:
            * inspector/CodeGeneratorInspector.pm:
            * inspector/front-end/Callback.js: Removed.
            * inspector/front-end/WebKit.qrc:
            * inspector/front-end/inspector.html:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74236 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index f34b2d9..3a38f38 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,23 @@
+2010-12-17  Ilya Tikhonovsky  <loislo at chromium.org>
+
+        Reviewed by Yury Semikhatsky.
+
+        Web Inspector: remove unnecessary dependencies from InspectorBackendStub.
+
+        InspectorBackendStub is a transport-only thing but it has dependencies with
+        Callback.js and WebInspector namespace. Callback can be integrated into
+        InspectorBackendStub because it is the only client.
+        Without these dependencies InspectorBackendStub can be used as an API
+        wrapper for Inspector Protocol.
+
+        https://bugs.webkit.org/show_bug.cgi?id=51184
+
+        * WebCore.gypi:
+        * inspector/CodeGeneratorInspector.pm:
+        * inspector/front-end/Callback.js: Removed.
+        * inspector/front-end/WebKit.qrc:
+        * inspector/front-end/inspector.html:
+
 2010-12-15  Andrey Kosyakov  <caseq at chromium.org>
 
         Reviewed by Pavel Feldman.
diff --git a/WebCore/WebCore.gypi b/WebCore/WebCore.gypi
index 66fccf4..fca8cfc 100644
--- a/WebCore/WebCore.gypi
+++ b/WebCore/WebCore.gypi
@@ -4601,7 +4601,6 @@
             'inspector/front-end/Breakpoint.js',
             'inspector/front-end/BreakpointManager.js',
             'inspector/front-end/BreakpointsSidebarPane.js',
-            'inspector/front-end/Callback.js',
             'inspector/front-end/CallStackSidebarPane.js',
             'inspector/front-end/ChangesView.js',
             'inspector/front-end/Checkbox.js',
diff --git a/WebCore/inspector/CodeGeneratorInspector.pm b/WebCore/inspector/CodeGeneratorInspector.pm
index 6d2e3c4..e960ed6 100644
--- a/WebCore/inspector/CodeGeneratorInspector.pm
+++ b/WebCore/inspector/CodeGeneratorInspector.pm
@@ -564,13 +564,33 @@ sub generateBackendStubJS
     my $inspectorBackendStubJS = << "EOF";
 $licenseTemplate
 
-WebInspector.InspectorBackendStub = function()
+InspectorBackendStub = function()
 {
+    this._lastCallbackId = 1;
+    this._callbacks = {};
     this._domainDispatchers = {};
 $JSStubs
 }
 
-WebInspector.InspectorBackendStub.prototype = {
+InspectorBackendStub.prototype = {
+    _wrap: function(callback)
+    {
+        var callbackId = this._lastCallbackId++;
+        this._callbacks[callbackId] = callback || function() {};
+        return callbackId;
+    },
+
+    _processResponse: function(callbackId, args)
+    {
+        var callback = this._callbacks[callbackId];
+        callback.apply(null, args);
+        delete this._callbacks[callbackId];
+    },
+
+    _removeResponseCallbackEntry: function(callbackId)
+    {
+        delete this._callbacks[callbackId];
+    },
 
     _registerDelegate: function(commandInfo)
     {
@@ -601,7 +621,7 @@ WebInspector.InspectorBackendStub.prototype = {
                 console.error("Protocol Error: Optional callback argument for 'InspectorBackend.%s' call should be a function but its type is '%s'.", request.command, typeof args[0]);
                 return;
             }
-            request.seq = WebInspector.Callback.wrap(args[0]);
+            request.seq = this._wrap(args[0]);
         }
 
         if (window.dumpInspectorProtocolMessages)
@@ -630,9 +650,9 @@ WebInspector.InspectorBackendStub.prototype = {
 
         if ("seq" in messageObject) { // just a response for some request
             if (messageObject.success)
-                WebInspector.Callback.processResponse(messageObject.seq, arguments);
+                this._processResponse(messageObject.seq, arguments);
             else {
-                WebInspector.Callback.removeResponseCallbackEntry(messageObject.seq)
+                this._removeResponseCallbackEntry(messageObject.seq)
                 this.reportProtocolError(messageObject);
             }
             return;
@@ -657,11 +677,11 @@ WebInspector.InspectorBackendStub.prototype = {
         console.error("Protocol Error: InspectorBackend request with seq = %d failed.", messageObject.seq);
         for (var i = 0; i < messageObject.errors.length; ++i)
             console.error("    " + messageObject.errors[i]);
-        WebInspector.Callback.removeResponseCallbackEntry(messageObject.seq);
+        this._removeResponseCallbackEntry(messageObject.seq);
     }
 }
 
-InspectorBackend = new WebInspector.InspectorBackendStub();
+InspectorBackend = new InspectorBackendStub();
 
 EOF
     return split("\n", $inspectorBackendStubJS);
diff --git a/WebCore/inspector/front-end/Callback.js b/WebCore/inspector/front-end/Callback.js
deleted file mode 100644
index 8e3f1d7..0000000
--- a/WebCore/inspector/front-end/Callback.js
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright (C) 2009 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- *     * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- *     * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-WebInspector.Callback = function()
-{
-    this._lastCallbackId = 1;
-    this._callbacks = {};
-}
-
-WebInspector.Callback.prototype = {
-    wrap: function(callback)
-    {
-        var callbackId = this._lastCallbackId++;
-        this._callbacks[callbackId] = callback || function() {};
-        return callbackId;
-    },
-
-    processResponse: function(callbackId, args)
-    {
-        var callback = this._callbacks[callbackId];
-        callback.apply(null, args);
-        delete this._callbacks[callbackId];
-    },
-
-    removeResponseCallbackEntry: function(callbackId)
-    {
-        delete this._callbacks[callbackId];
-    }
-}
-
-WebInspector.Callback._INSTANCE = new WebInspector.Callback();
-WebInspector.Callback.wrap = WebInspector.Callback._INSTANCE.wrap.bind(WebInspector.Callback._INSTANCE);
-WebInspector.Callback.processResponse = WebInspector.Callback._INSTANCE.processResponse.bind(WebInspector.Callback._INSTANCE);
-WebInspector.Callback.removeResponseCallbackEntry = WebInspector.Callback._INSTANCE.removeResponseCallbackEntry.bind(WebInspector.Callback._INSTANCE);
diff --git a/WebCore/inspector/front-end/WebKit.qrc b/WebCore/inspector/front-end/WebKit.qrc
index 2f91adb..90c4317 100644
--- a/WebCore/inspector/front-end/WebKit.qrc
+++ b/WebCore/inspector/front-end/WebKit.qrc
@@ -12,7 +12,6 @@
     <file>Breakpoint.js</file>
     <file>BreakpointManager.js</file>
     <file>BreakpointsSidebarPane.js</file>
-    <file>Callback.js</file>
     <file>CallStackSidebarPane.js</file>
     <file>ChangesView.js</file>
     <file>Checkbox.js</file>
diff --git a/WebCore/inspector/front-end/inspector.html b/WebCore/inspector/front-end/inspector.html
index 40e75ea..9ed5019 100644
--- a/WebCore/inspector/front-end/inspector.html
+++ b/WebCore/inspector/front-end/inspector.html
@@ -55,7 +55,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     <script type="text/javascript" src="TabbedPane.js"></script>
     <script type="text/javascript" src="Placard.js"></script>
     <script type="text/javascript" src="View.js"></script>
-    <script type="text/javascript" src="Callback.js"></script>
     <script type="text/javascript" src="Drawer.js"></script>
     <script type="text/javascript" src="ChangesView.js"></script>
     <script type="text/javascript" src="ConsoleView.js"></script>

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list