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 98fa6f29841c1bbda492a78be1e28da8e5e5f001..122f2bccf323287cc133e06f27bd959cf95b5971 100644 |
--- a/chrome/browser/extensions/api/socket/socket_api.cc |
+++ b/chrome/browser/extensions/api/socket/socket_api.cc |
@@ -173,9 +173,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()); |
} |
result_.reset(result); |
@@ -256,9 +254,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); |