未验证 提交 464af48e 编写于 作者: A Adam Barth 提交者: GitHub

[fuchsia] Adapt to FIDL1 VectorPtr API (#4804)

上级 cd9c438c
......@@ -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;
......
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册