| Index: chrome/browser/extensions/api/socket/socket_api.cc
|
| diff --git a/chrome/browser/extensions/api/socket/socket_api.cc b/chrome/browser/extensions/api/socket/socket_api.cc
|
| index 3afcee4c060e5fc4cad125c0a94660e554200b04..d0ae519c7b8c50ea8450de113b7b50063cfac00a 100644
|
| --- a/chrome/browser/extensions/api/socket/socket_api.cc
|
| +++ b/chrome/browser/extensions/api/socket/socket_api.cc
|
| @@ -382,9 +382,7 @@ void SocketReadFunction::OnCompleted(int bytes_read,
|
| base::BinaryValue::CreateWithCopiedBuffer(io_buffer->data(),
|
| bytes_read));
|
| } else {
|
| - // BinaryValue does not support NULL buffer. Workaround it with new char[1].
|
| - // http://crbug.com/127630
|
| - result->Set(kDataKey, base::BinaryValue::Create(new char[1], 0));
|
| + result->Set(kDataKey, new base::BinaryValue());
|
| }
|
| SetResult(result);
|
|
|
| @@ -465,9 +463,7 @@ void SocketRecvFromFunction::OnCompleted(int bytes_read,
|
| base::BinaryValue::CreateWithCopiedBuffer(io_buffer->data(),
|
| bytes_read));
|
| } else {
|
| - // BinaryValue does not support NULL buffer. Workaround it with new char[1].
|
| - // http://crbug.com/127630
|
| - result->Set(kDataKey, base::BinaryValue::Create(new char[1], 0));
|
| + result->Set(kDataKey, new base::BinaryValue());
|
| }
|
| result->SetString(kAddressKey, address);
|
| result->SetInteger(kPortKey, port);
|
|
|