2010-11-22 Ilya Tikhonovsky <loislo@chromium.org>
authorloislo@chromium.org <loislo@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 22 Nov 2010 16:46:45 +0000 (16:46 +0000)
committerloislo@chromium.org <loislo@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 22 Nov 2010 16:46:45 +0000 (16:46 +0000)
        Reviewed by Pavel Feldman.

        Web Inspector: dump inspector protocol messages into console.
        Sometimes I need to dump inspector messages into console.
        It'd be much simple to have this code in repository and
        enable protocol dumping just by a flag.

        https://bugs.webkit.org/show_bug.cgi?id=49905

        * inspector/CodeGeneratorInspector.pm:
        * inspector/front-end/WorkersSidebarPane.js:
        (WebInspector.WorkersSidebarPane.prototype.reset):
        * inspector/front-end/inspector.js:
        (WebInspector_syncDispatch):

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

WebCore/ChangeLog
WebCore/inspector/CodeGeneratorInspector.pm
WebCore/inspector/front-end/WorkersSidebarPane.js
WebCore/inspector/front-end/inspector.js

index a1eae9775105d030c5a403f1074b0a6123d382a0..352ea28edfdc26443783fb245fadf9326bd3b26a 100644 (file)
@@ -1,3 +1,20 @@
+2010-11-22  Ilya Tikhonovsky  <loislo@chromium.org>
+
+        Reviewed by Pavel Feldman.
+
+        Web Inspector: dump inspector protocol messages into console.
+        Sometimes I need to dump inspector messages into console.
+        It'd be much simple to have this code in repository and
+        enable protocol dumping just by a flag.
+
+        https://bugs.webkit.org/show_bug.cgi?id=49905
+
+        * inspector/CodeGeneratorInspector.pm:
+        * inspector/front-end/WorkersSidebarPane.js:
+        (WebInspector.WorkersSidebarPane.prototype.reset):
+        * inspector/front-end/inspector.js:
+        (WebInspector_syncDispatch):
+
 2010-11-22  Andreas Kling  <kling@webkit.org>
 
         Reviewed by Nikolas Zimmermann.
index c2b0eb476a2b71ce849ee0762a80b000d68ea96e..8a3654d3cb0e19d21b4b2bc7a5c23bc0fafe0056 100644 (file)
@@ -599,6 +599,9 @@ WebInspector.InspectorBackendStub.prototype = {
             request.seq = WebInspector.Callback.wrap(args[0]);
         }
 
+        if (window.dumpInspectorProtocolMessages)
+            console.log("frontend: " + JSON.stringify(request));
+
         var message = JSON.stringify(request);
         InspectorFrontendHost.sendMessageToBackend(message);
     }
index 177cd1590476cc7427978cd074a1f1e0c744b4e9..658d57c72fff31253fb81a1f1ef911fdaab3afa1 100644 (file)
@@ -81,7 +81,6 @@ WebInspector.WorkersSidebarPane.prototype = {
 
     reset: function()
     {
-        InspectorBackend.removeAllScriptsToEvaluateOnLoad();
         this.setInstrumentation(this._enableWorkersCheckbox.checked);
         this._treeOutline.removeChildren();
         this._workers = {};
index 33b370af391bae6fb67e1fa9bf420bf43bc673bb..92807e64f1f95924dde3206b7e351bcb5ae98042 100644 (file)
@@ -658,6 +658,9 @@ WebInspector.dispatch = function(message) {
 // This function is purposely put into the global scope for easy access.
 WebInspector_syncDispatch = function(message)
 {
+    if (window.dumpInspectorProtocolMessages)
+        console.log("backend: " + ((typeof message === "string") ? message : JSON.stringify(message)));
+
     var messageObject = (typeof message === "string") ? JSON.parse(message) : message;
 
     var arguments = [];