|
@@ -26,10 +26,8 @@ Converter<scoped_refptr<network::ResourceRequestBody>>::ToV8(
|
|
|
auto post_data_dict = std::make_unique<base::DictionaryValue>();
|
|
|
auto type = element.type();
|
|
|
if (type == network::DataElement::TYPE_BYTES) {
|
|
|
- auto vec = std::vector<char>(
|
|
|
- element.bytes(),
|
|
|
- element.bytes() + static_cast<size_t>(element.length()));
|
|
|
- auto bytes = std::make_unique<base::Value>(vec);
|
|
|
+ auto bytes = std::make_unique<base::Value>(std::vector<char>(
|
|
|
+ element.bytes(), element.bytes() + (element.length())));
|
|
|
post_data_dict->SetString("type", "rawData");
|
|
|
post_data_dict->Set("bytes", std::move(bytes));
|
|
|
} else if (type == network::DataElement::TYPE_FILE) {
|