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
+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
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, "}");
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());");
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)