2011-02-24 Ilya Tikhonovsky <loislo@chromium.org>
authorloislo@chromium.org <loislo@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 24 Feb 2011 14:51:52 +0000 (14:51 +0000)
committerloislo@chromium.org <loislo@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 24 Feb 2011 14:51:52 +0000 (14:51 +0000)
        Reviewed by Pavel Feldman.

        Web Inspector: adjust protocol message format according to spec.
        https://bugs.webkit.org/show_bug.cgi?id=55140

        * inspector/CodeGeneratorInspector.pm:

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

Source/WebCore/ChangeLog
Source/WebCore/inspector/CodeGeneratorInspector.pm

index 6433027656b1491c58887e97205e04f08f0fc80e..99a75922b71ee2211302a123eb07d53ae008ff48 100644 (file)
@@ -1,3 +1,12 @@
+2011-02-24  Ilya Tikhonovsky  <loislo@chromium.org>
+
+        Reviewed by Pavel Feldman.
+
+        Web Inspector: adjust protocol message format according to spec.
+        https://bugs.webkit.org/show_bug.cgi?id=55140
+
+        * inspector/CodeGeneratorInspector.pm:
+
 2011-02-24  Adam Roben  <aroben@apple.com>
 
         Windows Production build fix
 2011-02-24  Adam Roben  <aroben@apple.com>
 
         Windows Production build fix
index 58236b546cbcfd1e5c2c6602c5c290d66dc41b07..37d72a48c1c3762cd7b6a673f5c0bcf424c3b60c 100644 (file)
@@ -344,10 +344,10 @@ sub generateFrontendFunction
     push(@function, "    ${functionName}Message->setString(\"type\", \"event\");");
     push(@function, "    ${functionName}Message->setString(\"domain\", \"$domain\");");
     push(@function, "    ${functionName}Message->setString(\"event\", \"$functionName\");");
     push(@function, "    ${functionName}Message->setString(\"type\", \"event\");");
     push(@function, "    ${functionName}Message->setString(\"domain\", \"$domain\");");
     push(@function, "    ${functionName}Message->setString(\"event\", \"$functionName\");");
-    push(@function, "    RefPtr<InspectorObject> payloadDataObject = InspectorObject::create();");
-    my @pushArguments = map("    payloadDataObject->set" . typeTraits($_->type, "JSONType") . "(\"" . $_->name . "\", " . $_->name . ");", @argsFiltered);
+    push(@function, "    RefPtr<InspectorObject> bodyObject = InspectorObject::create();");
+    my @pushArguments = map("    bodyObject->set" . typeTraits($_->type, "JSONType") . "(\"" . $_->name . "\", " . $_->name . ");", @argsFiltered);
     push(@function, @pushArguments);
     push(@function, @pushArguments);
-    push(@function, "    ${functionName}Message->setObject(\"data\", payloadDataObject);");
+    push(@function, "    ${functionName}Message->setObject(\"body\", bodyObject);");
     push(@function, "    m_inspectorClient->sendMessageToFrontend(${functionName}Message->toJSONString());");
 
     push(@function, "}");
     push(@function, "    m_inspectorClient->sendMessageToFrontend(${functionName}Message->toJSONString());");
 
     push(@function, "}");
@@ -476,9 +476,9 @@ sub generateBackendFunction
     push(@function, "            responseMessage->setArray(\"errors\", protocolErrors);");
     if (scalar(@outArgs)) {
         push(@function, "        else {");
     push(@function, "            responseMessage->setArray(\"errors\", protocolErrors);");
     if (scalar(@outArgs)) {
         push(@function, "        else {");
-        push(@function, "            RefPtr<InspectorObject> responseData = InspectorObject::create();");
-        push(@function, map("            responseData->set" . typeTraits($_->type, "JSONType") . "(\"" . $_->name . "\", " . $_->name . ");", @outArgs));
-        push(@function, "            responseMessage->setObject(\"data\", responseData);");
+        push(@function, "            RefPtr<InspectorObject> responseBody = InspectorObject::create();");
+        push(@function, map("            responseBody->set" . typeTraits($_->type, "JSONType") . "(\"" . $_->name . "\", " . $_->name . ");", @outArgs));
+        push(@function, "            responseMessage->setObject(\"body\", responseBody);");
         push(@function, "        }");
     }
     push(@function, "        m_inspectorAgent->inspectorClient()->sendMessageToFrontend(responseMessage->toJSONString());");
         push(@function, "        }");
     }
     push(@function, "        m_inspectorAgent->inspectorClient()->sendMessageToFrontend(responseMessage->toJSONString());");
@@ -787,9 +787,9 @@ InspectorBackendStub.prototype = {
         var messageObject = (typeof message === "string") ? JSON.parse(message) : message;
 
         var arguments = [];
         var messageObject = (typeof message === "string") ? JSON.parse(message) : message;
 
         var arguments = [];
-        if (messageObject.data)
-            for (var key in messageObject.data)
-                arguments.push(messageObject.data[key]);
+        if (messageObject.body)
+            for (var key in messageObject.body)
+                arguments.push(messageObject.body[key]);
 
         if ("seq" in messageObject) { // just a response for some request
             if (messageObject.success)
 
         if ("seq" in messageObject) { // just a response for some request
             if (messageObject.success)