| Index: chrome/test/nacl/nacl_browsertest_util.cc
|
| diff --git a/chrome/test/nacl/nacl_browsertest_util.cc b/chrome/test/nacl/nacl_browsertest_util.cc
|
| index 7d63c84a3a28e554e9c39b76906f80a522f43226..bd79bdf94d685cd3b620488cf92f6e8b0e1da1ec 100644
|
| --- a/chrome/test/nacl/nacl_browsertest_util.cc
|
| +++ b/chrome/test/nacl/nacl_browsertest_util.cc
|
| @@ -24,12 +24,11 @@ typedef content::TestMessageHandler::MessageResponse MessageResponse;
|
|
|
| MessageResponse StructuredMessageHandler::HandleMessage(
|
| const std::string& json) {
|
| - scoped_ptr<base::Value> value;
|
| base::JSONReader reader(base::JSON_ALLOW_TRAILING_COMMAS);
|
| // Automation messages are stringified before they are sent because the
|
| // automation channel cannot handle arbitrary objects. This means we
|
| // need to decode the json twice to get the original message.
|
| - value.reset(reader.ReadToValue(json));
|
| + scoped_ptr<base::Value> value = reader.ReadToValue(json);
|
| if (!value.get())
|
| return InternalError("Could parse automation JSON: " + json +
|
| " because " + reader.GetErrorMessage());
|
| @@ -38,7 +37,7 @@ MessageResponse StructuredMessageHandler::HandleMessage(
|
| if (!value->GetAsString(&temp))
|
| return InternalError("Message was not a string: " + json);
|
|
|
| - value.reset(reader.ReadToValue(temp));
|
| + value = reader.ReadToValue(temp);
|
| if (!value.get())
|
| return InternalError("Could not parse message JSON: " + temp +
|
| " because " + reader.GetErrorMessage());
|
|
|