Commit 2b211de3 authored by eustas@chromium.org's avatar eustas@chromium.org

DevToolsProtocol: fix content Response::Parse.

content Response::Parse doesn't match chrome Response::Serialize.

BUG=373325

Review URL: https://codereview.chromium.org/300703002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@272883 0039d316-1c4b-4281-b951-d872f2087c98
parent 490e38f4
...@@ -259,11 +259,10 @@ DevToolsProtocol::ParseResponse( ...@@ -259,11 +259,10 @@ DevToolsProtocol::ParseResponse(
if (!response_dict->GetInteger(kIdParam, &id)) if (!response_dict->GetInteger(kIdParam, &id))
id = kNoId; id = kNoId;
int error_code; const base::DictionaryValue* error_dict;
if (!response_dict->GetInteger(kErrorCodeParam, &error_code)) if (response_dict->GetDictionary(kErrorParam, &error_dict)) {
return new Response(id, kErrorInternalError, "Invalid response"); int error_code = kErrorInternalError;
response_dict->GetInteger(kErrorCodeParam, &error_code);
if (error_code) {
std::string error_message; std::string error_message;
response_dict->GetString(kErrorMessageParam, &error_message); response_dict->GetString(kErrorMessageParam, &error_message);
return new Response(id, error_code, error_message); return new Response(id, error_code, error_message);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment