diff --git a/DEPS b/DEPS index bed722d581..aa594e58c4 100644 --- a/DEPS +++ b/DEPS @@ -34,7 +34,7 @@ vars = { # Dart is: https://github.com/dart-lang/sdk/blob/master/DEPS. # You can use //tools/dart/create_updated_flutter_deps.py to produce # updated revision list of existing dependencies. - 'dart_revision': '5814319bf93ec68addcf706fe694a2fd5b209abe', + 'dart_revision': '6a65ea9cad4b014f88d2f1be1b321db493725a1c', # WARNING: DO NOT EDIT MANUALLY # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py diff --git a/engine/src/flutter/runtime/dart_isolate.cc b/engine/src/flutter/runtime/dart_isolate.cc index 786c10e214..719cc68133 100644 --- a/engine/src/flutter/runtime/dart_isolate.cc +++ b/engine/src/flutter/runtime/dart_isolate.cc @@ -32,7 +32,6 @@ namespace flutter { std::weak_ptr DartIsolate::CreateRootIsolate( const Settings& settings, fml::RefPtr isolate_snapshot, - fml::RefPtr shared_snapshot, TaskRunners task_runners, std::unique_ptr window, fml::WeakPtr io_manager, @@ -59,7 +58,6 @@ std::weak_ptr DartIsolate::CreateRootIsolate( std::shared_ptr(new DartIsolate( settings, // settings std::move(isolate_snapshot), // isolate snapshot - std::move(shared_snapshot), // shared snapshot task_runners, // task runners std::move(io_manager), // IO manager std::move(unref_queue), // Skia unref queue @@ -104,7 +102,6 @@ std::weak_ptr DartIsolate::CreateRootIsolate( DartIsolate::DartIsolate(const Settings& settings, fml::RefPtr isolate_snapshot, - fml::RefPtr shared_snapshot, TaskRunners task_runners, fml::WeakPtr io_manager, fml::RefPtr unref_queue, @@ -127,7 +124,6 @@ DartIsolate::DartIsolate(const Settings& settings, DartVMRef::GetIsolateNameServer()), settings_(settings), isolate_snapshot_(std::move(isolate_snapshot)), - shared_snapshot_(std::move(shared_snapshot)), child_isolate_preparer_(std::move(child_isolate_preparer)), isolate_create_callback_(isolate_create_callback), isolate_shutdown_callback_(isolate_shutdown_callback) { @@ -596,7 +592,6 @@ Dart_Isolate DartIsolate::DartCreateAndStartServiceIsolate( DartIsolate::CreateRootIsolate( vm_data->GetSettings(), // settings vm_data->GetIsolateSnapshot(), // isolate snapshot - vm_data->GetSharedSnapshot(), // shared snapshot null_task_runners, // task runners nullptr, // window {}, // IO Manager @@ -710,7 +705,6 @@ DartIsolate::CreateDartVMAndEmbedderObjectPair( std::shared_ptr(new DartIsolate( (*raw_embedder_isolate)->GetSettings(), // settings (*raw_embedder_isolate)->GetIsolateSnapshot(), // isolate_snapshot - (*raw_embedder_isolate)->GetSharedSnapshot(), // shared_snapshot null_task_runners, // task_runners fml::WeakPtr{}, // io_manager fml::RefPtr{}, // unref_queue @@ -731,8 +725,7 @@ DartIsolate::CreateDartVMAndEmbedderObjectPair( advisory_script_entrypoint, // (*embedder_isolate)->GetIsolateSnapshot()->GetDataMapping(), (*embedder_isolate)->GetIsolateSnapshot()->GetInstructionsMapping(), - (*embedder_isolate)->GetSharedSnapshot()->GetDataMapping(), - (*embedder_isolate)->GetSharedSnapshot()->GetInstructionsMapping(), flags, + flags, embedder_isolate.get(), // isolate_group_data embedder_isolate.get(), // isolate_group error); @@ -797,10 +790,6 @@ fml::RefPtr DartIsolate::GetIsolateSnapshot() const { return isolate_snapshot_; } -fml::RefPtr DartIsolate::GetSharedSnapshot() const { - return shared_snapshot_; -} - std::weak_ptr DartIsolate::GetWeakIsolatePtr() { return std::static_pointer_cast(shared_from_this()); } diff --git a/engine/src/flutter/runtime/dart_isolate.h b/engine/src/flutter/runtime/dart_isolate.h index b94f9d299e..7ee76ded30 100644 --- a/engine/src/flutter/runtime/dart_isolate.h +++ b/engine/src/flutter/runtime/dart_isolate.h @@ -143,10 +143,6 @@ class DartIsolate : public UIDartState { /// usually obtained from the /// DartVMData associated with the /// running Dart VM instance. - /// @param[in] shared_snapshot The shared snapshot. This is - /// usually obtained from the - /// DartVMData associated with the - /// running Dart VM instance. /// @param[in] task_runners The task runners used by the /// isolate. Via UI bindings, the /// isolate will use the IO task @@ -193,7 +189,6 @@ class DartIsolate : public UIDartState { static std::weak_ptr CreateRootIsolate( const Settings& settings, fml::RefPtr isolate_snapshot, - fml::RefPtr shared_snapshot, TaskRunners task_runners, std::unique_ptr window, fml::WeakPtr io_manager, @@ -387,14 +382,6 @@ class DartIsolate : public UIDartState { /// fml::RefPtr GetIsolateSnapshot() const; - //---------------------------------------------------------------------------- - /// @brief Get the shared snapshot used to launch this isolate. This is - /// referenced by any child isolates launched by the root isolate. - /// - /// @return The shared snapshot. - /// - fml::RefPtr GetSharedSnapshot() const; - //---------------------------------------------------------------------------- /// @brief A weak pointer to the Dart isolate instance. This instance may /// only be used on the task runner that created the root isolate. @@ -430,7 +417,6 @@ class DartIsolate : public UIDartState { Phase phase_ = Phase::Unknown; const Settings settings_; const fml::RefPtr isolate_snapshot_; - const fml::RefPtr shared_snapshot_; std::vector> kernel_buffers_; std::vector> shutdown_callbacks_; ChildIsolatePreparer child_isolate_preparer_ = nullptr; @@ -440,7 +426,6 @@ class DartIsolate : public UIDartState { DartIsolate(const Settings& settings, fml::RefPtr isolate_snapshot, - fml::RefPtr shared_snapshot, TaskRunners task_runners, fml::WeakPtr io_manager, fml::RefPtr unref_queue, diff --git a/engine/src/flutter/runtime/dart_isolate_unittests.cc b/engine/src/flutter/runtime/dart_isolate_unittests.cc index 25b324666f..ccca07515d 100644 --- a/engine/src/flutter/runtime/dart_isolate_unittests.cc +++ b/engine/src/flutter/runtime/dart_isolate_unittests.cc @@ -38,7 +38,6 @@ TEST_F(DartIsolateTest, RootIsolateCreationAndShutdown) { auto weak_isolate = DartIsolate::CreateRootIsolate( vm_data->GetSettings(), // settings vm_data->GetIsolateSnapshot(), // isolate snapshot - vm_data->GetSharedSnapshot(), // shared snapshot std::move(task_runners), // task runners nullptr, // window {}, // io manager @@ -72,7 +71,6 @@ TEST_F(DartIsolateTest, IsolateShutdownCallbackIsInIsolateScope) { auto weak_isolate = DartIsolate::CreateRootIsolate( vm_data->GetSettings(), // settings vm_data->GetIsolateSnapshot(), // isolate snapshot - vm_data->GetSharedSnapshot(), // shared snapshot std::move(task_runners), // task runners nullptr, // window {}, // io manager @@ -183,7 +181,6 @@ static void RunDartCodeInIsolate(DartVMRef& vm_ref, auto weak_isolate = DartIsolate::CreateRootIsolate( vm_data->GetSettings(), // settings vm_data->GetIsolateSnapshot(), // isolate snapshot - vm_data->GetSharedSnapshot(), // shared snapshot std::move(task_runners), // task runners nullptr, // window {}, // io manager diff --git a/engine/src/flutter/runtime/dart_lifecycle_unittests.cc b/engine/src/flutter/runtime/dart_lifecycle_unittests.cc index 4653738e0d..77b14d319f 100644 --- a/engine/src/flutter/runtime/dart_lifecycle_unittests.cc +++ b/engine/src/flutter/runtime/dart_lifecycle_unittests.cc @@ -53,7 +53,6 @@ static std::shared_ptr CreateAndRunRootIsolate( auto isolate_weak = DartIsolate::CreateRootIsolate( vm.GetSettings(), // settings vm.GetIsolateSnapshot(), // isolate_snapshot - vm.GetSharedSnapshot(), // shared_snapshot runners, // task_runners {}, // window {}, // io_manager diff --git a/engine/src/flutter/runtime/dart_snapshot.cc b/engine/src/flutter/runtime/dart_snapshot.cc index acebcd3493..a5df79bb13 100644 --- a/engine/src/flutter/runtime/dart_snapshot.cc +++ b/engine/src/flutter/runtime/dart_snapshot.cc @@ -181,10 +181,6 @@ fml::RefPtr DartSnapshot::IsolateSnapshotFromSettings( return nullptr; } -fml::RefPtr DartSnapshot::Empty() { - return fml::MakeRefCounted(nullptr, nullptr); -} - DartSnapshot::DartSnapshot(std::shared_ptr data, std::shared_ptr instructions) : data_(std::move(data)), instructions_(std::move(instructions)) {} diff --git a/engine/src/flutter/runtime/dart_snapshot.h b/engine/src/flutter/runtime/dart_snapshot.h index 162710ff2a..97038aac4a 100644 --- a/engine/src/flutter/runtime/dart_snapshot.h +++ b/engine/src/flutter/runtime/dart_snapshot.h @@ -102,17 +102,6 @@ class DartSnapshot : public fml::RefCountedThreadSafe { static fml::RefPtr IsolateSnapshotFromSettings( const Settings& settings); - //---------------------------------------------------------------------------- - /// @brief An empty an invalid snapshot. This is used as a placeholder - /// for certain optional snapshots. - /// - /// @bug Now that shared snapshots are no longer required, consider - /// removing this constructor. - /// - /// @return An invalid empty snapshot. - /// - static fml::RefPtr Empty(); - //---------------------------------------------------------------------------- /// @brief Determines if this snapshot contains a heap component. Since /// the instructions component is optional, the method does not diff --git a/engine/src/flutter/runtime/dart_vm.cc b/engine/src/flutter/runtime/dart_vm.cc index 37f8e690f7..de9d08e3b3 100644 --- a/engine/src/flutter/runtime/dart_vm.cc +++ b/engine/src/flutter/runtime/dart_vm.cc @@ -232,12 +232,10 @@ std::shared_ptr DartVM::Create( Settings settings, fml::RefPtr vm_snapshot, fml::RefPtr isolate_snapshot, - fml::RefPtr shared_snapshot, std::shared_ptr isolate_name_server) { - auto vm_data = DartVMData::Create(settings, // - std::move(vm_snapshot), // - std::move(isolate_snapshot), // - std::move(shared_snapshot) // + auto vm_data = DartVMData::Create(settings, // + std::move(vm_snapshot), // + std::move(isolate_snapshot) // ); if (!vm_data) { diff --git a/engine/src/flutter/runtime/dart_vm.h b/engine/src/flutter/runtime/dart_vm.h index 40b8dc4a24..ac84fe7702 100644 --- a/engine/src/flutter/runtime/dart_vm.h +++ b/engine/src/flutter/runtime/dart_vm.h @@ -162,7 +162,6 @@ class DartVM { Settings settings, fml::RefPtr vm_snapshot, fml::RefPtr isolate_snapshot, - fml::RefPtr shared_snapshot, std::shared_ptr isolate_name_server); DartVM(std::shared_ptr data, diff --git a/engine/src/flutter/runtime/dart_vm_data.cc b/engine/src/flutter/runtime/dart_vm_data.cc index e14c998daa..a0287eba09 100644 --- a/engine/src/flutter/runtime/dart_vm_data.cc +++ b/engine/src/flutter/runtime/dart_vm_data.cc @@ -9,8 +9,7 @@ namespace flutter { std::shared_ptr DartVMData::Create( Settings settings, fml::RefPtr vm_snapshot, - fml::RefPtr isolate_snapshot, - fml::RefPtr shared_snapshot) { + fml::RefPtr isolate_snapshot) { if (!vm_snapshot || !vm_snapshot->IsValid()) { // Caller did not provide a valid VM snapshot. Attempt to infer one // from the settings. @@ -33,30 +32,19 @@ std::shared_ptr DartVMData::Create( } } - if (!shared_snapshot || !shared_snapshot->IsValid()) { - shared_snapshot = DartSnapshot::Empty(); - if (!shared_snapshot) { - FML_LOG(ERROR) << "Shared snapshot invalid."; - return {}; - } - } - return std::shared_ptr(new DartVMData( - std::move(settings), // - std::move(vm_snapshot), // - std::move(isolate_snapshot), // - std::move(shared_snapshot) // + std::move(settings), // + std::move(vm_snapshot), // + std::move(isolate_snapshot) // )); } DartVMData::DartVMData(Settings settings, fml::RefPtr vm_snapshot, - fml::RefPtr isolate_snapshot, - fml::RefPtr shared_snapshot) + fml::RefPtr isolate_snapshot) : settings_(settings), vm_snapshot_(vm_snapshot), - isolate_snapshot_(isolate_snapshot), - shared_snapshot_(shared_snapshot) {} + isolate_snapshot_(isolate_snapshot) {} DartVMData::~DartVMData() = default; @@ -72,8 +60,4 @@ fml::RefPtr DartVMData::GetIsolateSnapshot() const { return isolate_snapshot_; } -fml::RefPtr DartVMData::GetSharedSnapshot() const { - return shared_snapshot_; -} - } // namespace flutter diff --git a/engine/src/flutter/runtime/dart_vm_data.h b/engine/src/flutter/runtime/dart_vm_data.h index 95c4565e2e..0f054bf55f 100644 --- a/engine/src/flutter/runtime/dart_vm_data.h +++ b/engine/src/flutter/runtime/dart_vm_data.h @@ -15,8 +15,7 @@ class DartVMData { static std::shared_ptr Create( Settings settings, fml::RefPtr vm_snapshot, - fml::RefPtr isolate_snapshot, - fml::RefPtr shared_snapshot); + fml::RefPtr isolate_snapshot); ~DartVMData(); @@ -26,18 +25,14 @@ class DartVMData { fml::RefPtr GetIsolateSnapshot() const; - fml::RefPtr GetSharedSnapshot() const; - private: const Settings settings_; const fml::RefPtr vm_snapshot_; const fml::RefPtr isolate_snapshot_; - const fml::RefPtr shared_snapshot_; DartVMData(Settings settings, fml::RefPtr vm_snapshot, - fml::RefPtr isolate_snapshot, - fml::RefPtr shared_snapshot); + fml::RefPtr isolate_snapshot); FML_DISALLOW_COPY_AND_ASSIGN(DartVMData); }; diff --git a/engine/src/flutter/runtime/dart_vm_lifecycle.cc b/engine/src/flutter/runtime/dart_vm_lifecycle.cc index 717a0546a2..41a3da606a 100644 --- a/engine/src/flutter/runtime/dart_vm_lifecycle.cc +++ b/engine/src/flutter/runtime/dart_vm_lifecycle.cc @@ -43,8 +43,7 @@ DartVMRef::~DartVMRef() { DartVMRef DartVMRef::Create(Settings settings, fml::RefPtr vm_snapshot, - fml::RefPtr isolate_snapshot, - fml::RefPtr shared_snapshot) { + fml::RefPtr isolate_snapshot) { std::scoped_lock lifecycle_lock(gVMMutex); if (!settings.leak_vm) { @@ -78,7 +77,6 @@ DartVMRef DartVMRef::Create(Settings settings, auto vm = DartVM::Create(std::move(settings), // std::move(vm_snapshot), // std::move(isolate_snapshot), // - std::move(shared_snapshot), // isolate_name_server // ); diff --git a/engine/src/flutter/runtime/dart_vm_lifecycle.h b/engine/src/flutter/runtime/dart_vm_lifecycle.h index 5ce6cf7a57..d89b6d7cb4 100644 --- a/engine/src/flutter/runtime/dart_vm_lifecycle.h +++ b/engine/src/flutter/runtime/dart_vm_lifecycle.h @@ -29,8 +29,7 @@ class DartVMRef { FML_WARN_UNUSED_RESULT static DartVMRef Create(Settings settings, fml::RefPtr vm_snapshot = nullptr, - fml::RefPtr isolate_snapshot = nullptr, - fml::RefPtr shared_snapshot = nullptr); + fml::RefPtr isolate_snapshot = nullptr); DartVMRef(DartVMRef&&); diff --git a/engine/src/flutter/runtime/runtime_controller.cc b/engine/src/flutter/runtime/runtime_controller.cc index 7ec4bb550d..5ba0d37508 100644 --- a/engine/src/flutter/runtime/runtime_controller.cc +++ b/engine/src/flutter/runtime/runtime_controller.cc @@ -18,7 +18,6 @@ RuntimeController::RuntimeController( RuntimeDelegate& p_client, DartVM* p_vm, fml::RefPtr p_isolate_snapshot, - fml::RefPtr p_shared_snapshot, TaskRunners p_task_runners, fml::WeakPtr p_io_manager, fml::RefPtr p_unref_queue, @@ -32,7 +31,6 @@ RuntimeController::RuntimeController( : RuntimeController(p_client, p_vm, std::move(p_isolate_snapshot), - std::move(p_shared_snapshot), std::move(p_task_runners), std::move(p_io_manager), std::move(p_unref_queue), @@ -49,7 +47,6 @@ RuntimeController::RuntimeController( RuntimeDelegate& p_client, DartVM* p_vm, fml::RefPtr p_isolate_snapshot, - fml::RefPtr p_shared_snapshot, TaskRunners p_task_runners, fml::WeakPtr p_io_manager, fml::RefPtr p_unref_queue, @@ -64,7 +61,6 @@ RuntimeController::RuntimeController( : client_(p_client), vm_(p_vm), isolate_snapshot_(std::move(p_isolate_snapshot)), - shared_snapshot_(std::move(p_shared_snapshot)), task_runners_(p_task_runners), io_manager_(p_io_manager), unref_queue_(p_unref_queue), @@ -82,7 +78,6 @@ RuntimeController::RuntimeController( auto strong_root_isolate = DartIsolate::CreateRootIsolate(vm_->GetVMData()->GetSettings(), // isolate_snapshot_, // - shared_snapshot_, // task_runners_, // std::make_unique(this), // io_manager_, // @@ -144,7 +139,6 @@ std::unique_ptr RuntimeController::Clone() const { client_, // vm_, // isolate_snapshot_, // - shared_snapshot_, // task_runners_, // io_manager_, // unref_queue_, // diff --git a/engine/src/flutter/runtime/runtime_controller.h b/engine/src/flutter/runtime/runtime_controller.h index 615873ad64..1418f8c100 100644 --- a/engine/src/flutter/runtime/runtime_controller.h +++ b/engine/src/flutter/runtime/runtime_controller.h @@ -32,7 +32,6 @@ class RuntimeController final : public WindowClient { RuntimeDelegate& client, DartVM* vm, fml::RefPtr isolate_snapshot, - fml::RefPtr shared_snapshot, TaskRunners task_runners, fml::WeakPtr io_manager, fml::RefPtr unref_queue, @@ -129,7 +128,6 @@ class RuntimeController final : public WindowClient { RuntimeDelegate& client_; DartVM* const vm_; fml::RefPtr isolate_snapshot_; - fml::RefPtr shared_snapshot_; TaskRunners task_runners_; fml::WeakPtr io_manager_; fml::RefPtr unref_queue_; @@ -148,7 +146,6 @@ class RuntimeController final : public WindowClient { RuntimeDelegate& client, DartVM* vm, fml::RefPtr isolate_snapshot, - fml::RefPtr shared_snapshot, TaskRunners task_runners, fml::WeakPtr io_manager, fml::RefPtr unref_queue, diff --git a/engine/src/flutter/shell/common/engine.cc b/engine/src/flutter/shell/common/engine.cc index 7345ac2055..3e18348828 100644 --- a/engine/src/flutter/shell/common/engine.cc +++ b/engine/src/flutter/shell/common/engine.cc @@ -39,7 +39,6 @@ Engine::Engine(Delegate& delegate, const PointerDataDispatcherMaker& dispatcher_maker, DartVM& vm, fml::RefPtr isolate_snapshot, - fml::RefPtr shared_snapshot, TaskRunners task_runners, Settings settings, std::unique_ptr animator, @@ -62,7 +61,6 @@ Engine::Engine(Delegate& delegate, *this, // runtime delegate &vm, // VM std::move(isolate_snapshot), // isolate snapshot - std::move(shared_snapshot), // shared snapshot task_runners_, // task runners std::move(io_manager), // io manager std::move(unref_queue), // Skia unref queue diff --git a/engine/src/flutter/shell/common/engine.h b/engine/src/flutter/shell/common/engine.h index cc9d1bcf68..75e8fcb7e1 100644 --- a/engine/src/flutter/shell/common/engine.h +++ b/engine/src/flutter/shell/common/engine.h @@ -249,8 +249,6 @@ class Engine final : public RuntimeDelegate, PointerDataDispatcher::Delegate { /// created when the engine is created. This /// requires access to the isolate snapshot /// upfront. - /// @param[in] shared_snapshot The portion of the isolate snapshot shared - /// among multiple isolates. // TODO(chinmaygarde): This is probably redundant now that the IO manager is // it's own object. /// @param[in] task_runners The task runners used by the shell that @@ -276,7 +274,6 @@ class Engine final : public RuntimeDelegate, PointerDataDispatcher::Delegate { const PointerDataDispatcherMaker& dispatcher_maker, DartVM& vm, fml::RefPtr isolate_snapshot, - fml::RefPtr shared_snapshot, TaskRunners task_runners, Settings settings, std::unique_ptr animator, diff --git a/engine/src/flutter/shell/common/shell.cc b/engine/src/flutter/shell/common/shell.cc index cc88bb9095..4bb7fd740f 100644 --- a/engine/src/flutter/shell/common/shell.cc +++ b/engine/src/flutter/shell/common/shell.cc @@ -45,7 +45,6 @@ std::unique_ptr Shell::CreateShellOnPlatformThread( TaskRunners task_runners, Settings settings, fml::RefPtr isolate_snapshot, - fml::RefPtr shared_snapshot, Shell::CreateCallback on_create_platform_view, Shell::CreateCallback on_create_rasterizer) { if (!task_runners.IsValid()) { @@ -128,7 +127,6 @@ std::unique_ptr Shell::CreateShellOnPlatformThread( shell = shell.get(), // &dispatcher_maker, // isolate_snapshot = std::move(isolate_snapshot), // - shared_snapshot = std::move(shared_snapshot), // vsync_waiter = std::move(vsync_waiter), // &weak_io_manager_future, // &unref_queue_future // @@ -146,7 +144,6 @@ std::unique_ptr Shell::CreateShellOnPlatformThread( dispatcher_maker, // *shell->GetDartVM(), // std::move(isolate_snapshot), // - std::move(shared_snapshot), // task_runners, // shell->GetSettings(), // std::move(animator), // @@ -233,7 +230,6 @@ std::unique_ptr Shell::Create( return Shell::Create(std::move(task_runners), // std::move(settings), // vm_data->GetIsolateSnapshot(), // isolate snapshot - DartSnapshot::Empty(), // shared snapshot std::move(on_create_platform_view), // std::move(on_create_rasterizer), // std::move(vm) // @@ -244,7 +240,6 @@ std::unique_ptr Shell::Create( TaskRunners task_runners, Settings settings, fml::RefPtr isolate_snapshot, - fml::RefPtr shared_snapshot, Shell::CreateCallback on_create_platform_view, Shell::CreateCallback on_create_rasterizer, DartVMRef vm) { @@ -268,7 +263,6 @@ std::unique_ptr Shell::Create( task_runners = std::move(task_runners), // settings, // isolate_snapshot = std::move(isolate_snapshot), // - shared_snapshot = std::move(shared_snapshot), // on_create_platform_view, // on_create_rasterizer // ]() mutable { @@ -276,7 +270,6 @@ std::unique_ptr Shell::Create( std::move(task_runners), // settings, // std::move(isolate_snapshot), // - std::move(shared_snapshot), // on_create_platform_view, // on_create_rasterizer // ); diff --git a/engine/src/flutter/shell/common/shell.h b/engine/src/flutter/shell/common/shell.h index e4ee696038..cc3ed8fdc4 100644 --- a/engine/src/flutter/shell/common/shell.h +++ b/engine/src/flutter/shell/common/shell.h @@ -139,9 +139,6 @@ class Shell final : public PlatformView::Delegate, /// @param[in] isolate_snapshot A custom isolate snapshot. Takes /// precedence over any snapshots /// specified in the settings. - /// @param[in] shared_snapshot A custom shared snapshot. Takes - /// precedence over any snapshots - /// specified in the settings. /// @param[in] on_create_platform_view The callback that must return a /// platform view. This will be called on /// the platform task runner before this @@ -164,7 +161,6 @@ class Shell final : public PlatformView::Delegate, TaskRunners task_runners, Settings settings, fml::RefPtr isolate_snapshot, - fml::RefPtr shared_snapshot, CreateCallback on_create_platform_view, CreateCallback on_create_rasterizer, DartVMRef vm); @@ -375,7 +371,6 @@ class Shell final : public PlatformView::Delegate, TaskRunners task_runners, Settings settings, fml::RefPtr isolate_snapshot, - fml::RefPtr shared_snapshot, Shell::CreateCallback on_create_platform_view, Shell::CreateCallback on_create_rasterizer); diff --git a/engine/src/flutter/shell/platform/fuchsia/dart_runner/dart_component_controller.cc b/engine/src/flutter/shell/platform/fuchsia/dart_runner/dart_component_controller.cc index 37cef7bce6..d62676164b 100644 --- a/engine/src/flutter/shell/platform/fuchsia/dart_runner/dart_component_controller.cc +++ b/engine/src/flutter/shell/platform/fuchsia/dart_runner/dart_component_controller.cc @@ -314,9 +314,7 @@ bool DartComponentController::CreateIsolate( isolate_ = Dart_CreateIsolateGroup( url_.c_str(), label_.c_str(), isolate_snapshot_data, - isolate_snapshot_instructions, nullptr /* shared_snapshot_data */, - nullptr /* shared_snapshot_instructions */, nullptr /* flags */, state, - state, &error); + isolate_snapshot_instructions, nullptr /* flags */, state, state, &error); if (!isolate_) { FX_LOGF(ERROR, LOG_TAG, "Dart_CreateIsolateGroup failed: %s", error); return false; diff --git a/engine/src/flutter/shell/platform/fuchsia/dart_runner/service_isolate.cc b/engine/src/flutter/shell/platform/fuchsia/dart_runner/service_isolate.cc index d22c4df286..c6831befb0 100644 --- a/engine/src/flutter/shell/platform/fuchsia/dart_runner/service_isolate.cc +++ b/engine/src/flutter/shell/platform/fuchsia/dart_runner/service_isolate.cc @@ -106,10 +106,8 @@ Dart_Isolate CreateServiceIsolate(const char* uri, auto state = new std::shared_ptr(new tonic::DartState()); Dart_Isolate isolate = Dart_CreateIsolateGroup( uri, DART_VM_SERVICE_ISOLATE_NAME, mapped_isolate_snapshot_data.address(), - mapped_isolate_snapshot_instructions.address(), - nullptr /* shared_snapshot_data */, - nullptr /* shared_snapshot_instructions */, nullptr /* flags */, state, - state, error); + mapped_isolate_snapshot_instructions.address(), nullptr /* flags */, + state, state, error); if (!isolate) { FX_LOGF(ERROR, LOG_TAG, "Dart_CreateIsolateGroup failed: %s", *error); return nullptr; diff --git a/engine/src/flutter/shell/platform/fuchsia/flutter/engine.cc b/engine/src/flutter/shell/platform/fuchsia/flutter/engine.cc index 75dbf497b8..58088f1273 100644 --- a/engine/src/flutter/shell/platform/fuchsia/flutter/engine.cc +++ b/engine/src/flutter/shell/platform/fuchsia/flutter/engine.cc @@ -224,13 +224,12 @@ Engine::Engine(Delegate& delegate, { TRACE_EVENT0("flutter", "CreateShell"); shell_ = flutter::Shell::Create( - task_runners, // host task runners - settings_, // shell launch settings - std::move(isolate_snapshot), // isolate snapshot - flutter::DartSnapshot::Empty(), // shared snapshot - on_create_platform_view, // platform view create callback - on_create_rasterizer, // rasterizer create callback - std::move(vm) // vm reference + task_runners, // host task runners + settings_, // shell launch settings + std::move(isolate_snapshot), // isolate snapshot + on_create_platform_view, // platform view create callback + on_create_rasterizer, // rasterizer create callback + std::move(vm) // vm reference ); }