From: loislo@chromium.org Date: Thu, 24 Feb 2011 14:51:52 +0000 (+0000) Subject: 2011-02-24 Ilya Tikhonovsky X-Git-Url: https://git.webkit.org/?p=WebKit-https.git;a=commitdiff_plain;h=294afe972b002ca5f37040acddd982bf9145ff01;ds=sidebyside 2011-02-24 Ilya Tikhonovsky 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 --- diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog index 6433027656b1..99a75922b71e 100644 --- a/Source/WebCore/ChangeLog +++ b/Source/WebCore/ChangeLog @@ -1,3 +1,12 @@ +2011-02-24 Ilya Tikhonovsky + + 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 Windows Production build fix diff --git a/Source/WebCore/inspector/CodeGeneratorInspector.pm b/Source/WebCore/inspector/CodeGeneratorInspector.pm index 58236b546cbc..37d72a48c1c3 100644 --- a/Source/WebCore/inspector/CodeGeneratorInspector.pm +++ b/Source/WebCore/inspector/CodeGeneratorInspector.pm @@ -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, " RefPtr payloadDataObject = InspectorObject::create();"); - my @pushArguments = map(" payloadDataObject->set" . typeTraits($_->type, "JSONType") . "(\"" . $_->name . "\", " . $_->name . ");", @argsFiltered); + push(@function, " RefPtr bodyObject = InspectorObject::create();"); + my @pushArguments = map(" bodyObject->set" . typeTraits($_->type, "JSONType") . "(\"" . $_->name . "\", " . $_->name . ");", @argsFiltered); 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, "}"); @@ -476,9 +476,9 @@ sub generateBackendFunction push(@function, " responseMessage->setArray(\"errors\", protocolErrors);"); if (scalar(@outArgs)) { push(@function, " else {"); - push(@function, " RefPtr responseData = InspectorObject::create();"); - push(@function, map(" responseData->set" . typeTraits($_->type, "JSONType") . "(\"" . $_->name . "\", " . $_->name . ");", @outArgs)); - push(@function, " responseMessage->setObject(\"data\", responseData);"); + push(@function, " RefPtr 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());"); @@ -787,9 +787,9 @@ InspectorBackendStub.prototype = { 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)