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

Unified Diff: services/native_support/redirectors.cc

Issue 1397133002: Remove callers of mojo::Array<size_t> constructor in favor of ::New (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 2 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 | « services/js/system/tests/js_to_cpp_tests.cc ('k') | services/reaper/reaper_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/native_support/redirectors.cc
diff --git a/services/native_support/redirectors.cc b/services/native_support/redirectors.cc
index 4b9a59dafd2fa75d1f2d34092efe1d4d5751fd5b..7024606624665ba9cadea300688a813072328906 100644
--- a/services/native_support/redirectors.cc
+++ b/services/native_support/redirectors.cc
@@ -77,7 +77,7 @@ void FDToMojoFileRedirector::DoWrite() {
size_t num_bytes_to_write = num_bytes_ - offset_;
// TODO(vtl): Is there a more natural (or efficient) way to do this?
- mojo::Array<uint8_t> bytes_to_write(num_bytes_to_write);
+ auto bytes_to_write = mojo::Array<uint8_t>::New(num_bytes_to_write);
memcpy(&bytes_to_write[offset_], buffer_.get(), num_bytes_to_write);
file_->Write(bytes_to_write.Pass(), 0, mojo::files::Whence::FROM_CURRENT,
« no previous file with comments | « services/js/system/tests/js_to_cpp_tests.cc ('k') | services/reaper/reaper_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698