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

Unified Diff: content/child/v8_value_converter_impl.cc

Issue 2841623003: Remove base::Value::Get{Buffer,Size} (Closed)
Patch Set: std::vector::assign instead of std::vector::operator= 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 | « chrome/browser/extensions/extension_action.cc ('k') | content/common/android/gin_java_bridge_value.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 ad5f6dd9792a995a05649df497b3bd972fc5b11a..89b3fc79c78abffc275a636ba54c14a6a8160d30 100644
--- a/content/child/v8_value_converter_impl.cc
+++ b/content/child/v8_value_converter_impl.cc
@@ -342,8 +342,9 @@ v8::Local<v8::Value> V8ValueConverterImpl::ToArrayBuffer(
const base::Value* value) const {
DCHECK(creation_context->CreationContext() == isolate->GetCurrentContext());
v8::Local<v8::ArrayBuffer> buffer =
- v8::ArrayBuffer::New(isolate, value->GetSize());
- memcpy(buffer->GetContents().Data(), value->GetBuffer(), value->GetSize());
+ v8::ArrayBuffer::New(isolate, value->GetBlob().size());
+ memcpy(buffer->GetContents().Data(), value->GetBlob().data(),
+ value->GetBlob().size());
return buffer;
}
« no previous file with comments | « chrome/browser/extensions/extension_action.cc ('k') | content/common/android/gin_java_bridge_value.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698