New issue
Advanced search Search tips

Issue 798985 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner:
Closed: Nov 27
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Unused value in DevToolsHttpHandler::SendJson

Project Member Reported by mattcary@chromium.org, Jan 4 2018

Issue description

In DevToolsHttpHandler::SendJson, the std:string message parameter is converted into a JSON value and exported to a string json_message, which is not used; instead the original message is put into the return body.

After briefly looking at call sites, it appears that message is used to report errors, and in that case the base:Value which is the usual payload is empty. Thus it may not matter if message is JSON-written or not.

If the construction of json_message is simply removed, we save some cycles and don't change behavior. If json_message is put in the body instead of message, we may save some future bugs if someone expects something to happen with the JSON encoding, but we may also break existing usage.

I'll dig around when I have time to try to resolve the question, but if anyone informed has an opinion I'd be happy to implement their suggestion.

+pfeldman, I've added you as you seem to have made recent changes to this file. Perhaps you have an idea?
 
Should we close this one?
Status: WontFix (was: Assigned)
Yeah, seems not to matter.

Sign in to add a comment