Skip to content

Commit

Permalink
[fuchsia] Adapt to FIDL1 VectorPtr API (flutter#4804)
Browse files Browse the repository at this point in the history
  • Loading branch information
abarth authored Mar 17, 2018
1 parent cd9c438 commit 464af48
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
11 changes: 6 additions & 5 deletions content_handler/application_controller_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -82,17 +82,18 @@ fdio_ns_t* ApplicationControllerImpl::SetupNamespace(
FXL_LOG(ERROR) << "Failed to create namespace";
return nullptr;
}
for (size_t i = 0; i < flat->paths.size(); ++i) {
if (flat->paths[i] == kServiceRootPath) {
for (size_t i = 0; i < flat->paths->size(); ++i) {
if (flat->paths->at(i) == kServiceRootPath) {
// Ownership of /svc goes to the ApplicationContext created above.
continue;
}
zx::channel dir = std::move(flat->directories[i]);
zx::channel dir = std::move(flat->directories->at(i));
zx_handle_t dir_handle = dir.release();
const char* path = flat->paths[i]->data();
const char* path = flat->paths->at(i)->data();
status = fdio_ns_bind(fdio_namespc, path, dir_handle);
if (status != ZX_OK) {
FXL_LOG(ERROR) << "Failed to bind " << flat->paths[i] << " to namespace";
FXL_LOG(ERROR) << "Failed to bind " << flat->paths->at(i)
<< " to namespace";
zx_handle_close(dir_handle);
fdio_ns_destroy(fdio_namespc);
return nullptr;
Expand Down
2 changes: 1 addition & 1 deletion content_handler/session_connection.cc
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ void SessionConnection::OnSessionError() {

void SessionConnection::OnSessionEvents(f1dl::Array<ui::EventPtr> events) {
ui::gfx::MetricsPtr new_metrics;
for (const auto& event : events) {
for (const auto& event : *events) {
if (event->is_gfx() && event->get_gfx()->is_metrics() &&
event->get_gfx()->get_metrics()->node_id == root_node_.id()) {
new_metrics = std::move(event->get_gfx()->get_metrics()->metrics);
Expand Down

0 comments on commit 464af48

Please sign in to comment.