Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(144)

Unified Diff: content/child/v8_value_converter_impl.cc

Issue 2799093006: Remove base::BinaryValue (Closed)
Patch Set: Rebase Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/child/v8_value_converter_impl.h ('k') | content/child/v8_value_converter_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/v8_value_converter_impl.cc
diff --git a/content/child/v8_value_converter_impl.cc b/content/child/v8_value_converter_impl.cc
index 1391adf3b84626ccfd0d43b1bcc428857b01da96..ad5f6dd9792a995a05649df497b3bd972fc5b11a 100644
--- a/content/child/v8_value_converter_impl.cc
+++ b/content/child/v8_value_converter_impl.cc
@@ -339,7 +339,7 @@ v8::Local<v8::Value> V8ValueConverterImpl::ToV8Object(
v8::Local<v8::Value> V8ValueConverterImpl::ToArrayBuffer(
v8::Isolate* isolate,
v8::Local<v8::Object> creation_context,
- const base::BinaryValue* value) const {
+ const base::Value* value) const {
DCHECK(creation_context->CreationContext() == isolate->GetCurrentContext());
v8::Local<v8::ArrayBuffer> buffer =
v8::ArrayBuffer::New(isolate, value->GetSize());
@@ -502,14 +502,14 @@ std::unique_ptr<base::Value> V8ValueConverterImpl::FromV8ArrayBuffer(
if (val->IsArrayBuffer()) {
auto contents = val.As<v8::ArrayBuffer>()->GetContents();
- return base::BinaryValue::CreateWithCopiedBuffer(
+ return base::Value::CreateWithCopiedBuffer(
static_cast<const char*>(contents.Data()), contents.ByteLength());
} else if (val->IsArrayBufferView()) {
v8::Local<v8::ArrayBufferView> view = val.As<v8::ArrayBufferView>();
size_t byte_length = view->ByteLength();
std::vector<char> buffer(byte_length);
view->CopyContents(buffer.data(), buffer.size());
- return base::MakeUnique<base::BinaryValue>(std::move(buffer));
+ return base::MakeUnique<base::Value>(std::move(buffer));
} else {
NOTREACHED() << "Only ArrayBuffer and ArrayBufferView should get here.";
return nullptr;
« no previous file with comments | « content/child/v8_value_converter_impl.h ('k') | content/child/v8_value_converter_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698