From 2ad422b25f4161b0244ae3dfd50b82ea0583ee37 Mon Sep 17 00:00:00 2001 From: Adam Barth Date: Wed, 7 Sep 2016 11:17:36 -0700 Subject: [PATCH] Add asset bundle support on Fuchsia (flutter/engine#3005) After this patch, Flutter apps on Fuchsia can access their asset bundles. Unlike other platforms, the asset bundles are stored in memory rather than in the file system. --- engine/src/flutter/lib/ui/mojo_services.cc | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/engine/src/flutter/lib/ui/mojo_services.cc b/engine/src/flutter/lib/ui/mojo_services.cc index a03f7814dfb..cf930794872 100644 --- a/engine/src/flutter/lib/ui/mojo_services.cc +++ b/engine/src/flutter/lib/ui/mojo_services.cc @@ -81,18 +81,19 @@ void MojoServices::Create(Dart_Isolate isolate, mojo::ServiceProviderPtr incoming_services, mojo::asset_bundle::AssetBundlePtr root_bundle) { UIDartState* state = static_cast(DartState::From(isolate)); - state->set_mojo_services(std::unique_ptr(new MojoServices( - services.Pass(), incoming_services.Pass(), root_bundle.Pass()))); + state->set_mojo_services(std::unique_ptr( + new MojoServices(std::move(services), std::move(incoming_services), + std::move(root_bundle)))); } MojoServices::MojoServices(sky::ServicesDataPtr services, mojo::ServiceProviderPtr incoming_services, mojo::asset_bundle::AssetBundlePtr root_bundle) - : services_(services.Pass()), - root_bundle_(root_bundle.Pass()), - incoming_services_(incoming_services.Pass()) { + : services_(std::move(services)), + root_bundle_(std::move(root_bundle)), + incoming_services_(std::move(incoming_services)) { if (services_ && services_->outgoing_services.is_pending()) { - outgoing_services_ = services_->outgoing_services.Pass(); + outgoing_services_ = std::move(services_->outgoing_services); } else { outgoing_services_ = GetProxy(&services_from_dart_); }