Remove base::Value::Get{Buffer,Size}
https://codereview.chromium.org/2841623003
This commit is contained in:
parent
132029ea32
commit
58e0771e47
3 changed files with 5 additions and 5 deletions
|
@ -60,8 +60,8 @@ void URLRequestBufferJob::StartAsync(std::unique_ptr<base::Value> options) {
|
|||
}
|
||||
|
||||
data_ = new base::RefCountedBytes(
|
||||
reinterpret_cast<const unsigned char*>(binary->GetBuffer()),
|
||||
binary->GetSize());
|
||||
reinterpret_cast<const unsigned char*>(binary->GetBlob().data()),
|
||||
binary->GetBlob().size());
|
||||
status_code_ = net::HTTP_OK;
|
||||
net::URLRequestSimpleJob::Start();
|
||||
}
|
||||
|
|
|
@ -262,7 +262,7 @@ bool Converter<scoped_refptr<ResourceRequestBodyImpl>>::FromV8(
|
|||
if (type == "rawData") {
|
||||
base::Value* bytes = nullptr;
|
||||
dict->GetBinary("bytes", &bytes);
|
||||
(*out)->AppendBytes(bytes->GetBuffer(), bytes->GetSize());
|
||||
(*out)->AppendBytes(bytes->GetBlob().data(), bytes->GetBlob().size());
|
||||
} else if (type == "file") {
|
||||
std::string file;
|
||||
int offset = 0, length = -1;
|
||||
|
|
|
@ -255,8 +255,8 @@ v8::Local<v8::Value> V8ValueConverter::ToV8Object(
|
|||
|
||||
v8::Local<v8::Value> V8ValueConverter::ToArrayBuffer(
|
||||
v8::Isolate* isolate, const base::Value* value) const {
|
||||
const char* data = value->GetBuffer();
|
||||
size_t length = value->GetSize();
|
||||
const char* data = value->GetBlob().data();
|
||||
size_t length = value->GetBlob().size();
|
||||
|
||||
if (!disable_node_) {
|
||||
return node::Buffer::Copy(isolate, data, length).ToLocalChecked();
|
||||
|
|
Loading…
Reference in a new issue