Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Conversation

@chinmaygarde
Copy link
Contributor

This exposes the Settings::leak_vm flag to custom embedders. All embedder
unit-tests now shut down the VM on the shutdown of the last engine in the
process. The mechanics of VM shutdown are already tested in the Shell unit-tests
harness in the DartLifecycleUnittests set of of assertions. This just exposes
that functionality to custom embedders. Since it is part of the public stable
API, I also switched the name of the field to be something less snarky than the
field in private shell settings.

This exposes the `Settings::leak_vm` flag to custom embedders. All embedder
unit-tests now shut down the VM on the shutdown of the last engine in the
process. The mechanics of VM shutdown are already tested in the Shell unit-tests
harness in the DartLifecycleUnittests set of of assertions. This just exposes
that functionality to custom embedders. Since it is part of the public stable
API, I also switched the name of the field to be something less snarky than the
field in private shell settings.
@chinmaygarde
Copy link
Contributor Author

Fixes flutter/flutter#37401

@chinmaygarde chinmaygarde merged commit b769353 into flutter:master Aug 6, 2019
@chinmaygarde chinmaygarde deleted the embedder_shutdown_vm branch August 6, 2019 23:15
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Aug 7, 2019
engine-flutter-autoroll added a commit to flutter/flutter that referenced this pull request Aug 7, 2019
git@github.com:flutter/engine.git/compare/42917704790d...9bfa4f5

git log 4291770..9bfa4f5 --no-merges --oneline
2019-08-07 stuartmorgan@google.com Roll buildroot back to an earlier version (flutter/engine#10681)
2019-08-07 stuartmorgan@google.com Roll buildroot to pick up EGL library name fix (flutter/engine#10679)
2019-08-06 chinmaygarde@google.com Remove semi-redundant try-jobs. (flutter/engine#10485)
2019-08-06 chinmaygarde@google.com Allow embedders to control Dart VM lifecycle on engine shutdown. (flutter/engine#10652)
2019-08-06 matthew-carroll@users.noreply.github.com Android embedding refactor pr40 add static engine cache (flutter/engine#10481)
2019-08-06 skia-flutter-autoroll@skia.org Roll fuchsia/sdk/core/linux-amd64 from W6ZtV... to 9sR9P... (flutter/engine#10672)
2019-08-06 bkonyi@google.com Roll src/third_party/dart 574c4a51c6..c262cbd414 (11 commits)
2019-08-06 stuartmorgan@google.com Roll buildroot for ANGLE support (flutter/engine#10667)

The AutoRoll server is located here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

If the roll is causing failures, please contact the current sheriff (jimgraham@google.com), and stop
the roller if necessary.
cyanglaz pushed a commit to cyanglaz/engine that referenced this pull request Aug 16, 2019
…tter#10652)

This exposes the `Settings::leak_vm` flag to custom embedders. All embedder
unit-tests now shut down the VM on the shutdown of the last engine in the
process. The mechanics of VM shutdown are already tested in the Shell unit-tests
harness in the DartLifecycleUnittests set of of assertions. This just exposes
that functionality to custom embedders. Since it is part of the public stable
API, I also switched the name of the field to be something less snarky than the
field in private shell settings.
cbracken added a commit that referenced this pull request Aug 9, 2022
All Flutter engines in the same process share a common Dart VM, which is
launched with the start of the first engine in the process and should be
terminated when the last engine in the process has been deallocated.

Formerly, it was not possible to cleanly shut down and restart the VM in
a process, but this was resolved in the Dart SDK and a flag exposed in
#10652. Since some embedders take advantage of the fact
that the VM remains running after engine shutdown, this flag is not
enabled by default, however it should be enabled for the Windows
embedder, which we control.

No tests added since this is not testable via any API to which the
Windows embedder has access. The behaviour of this flag is tested in the
embedder API tests in `EmbedderTest.VMShutsDownWhenNoEnginesInProcess`
in shell/platform/embedder/tests/embedder_unittests.cc.

Issue: flutter/flutter#109191
emilyabest pushed a commit to emilyabest/engine that referenced this pull request Aug 12, 2022
All Flutter engines in the same process share a common Dart VM, which is
launched with the start of the first engine in the process and should be
terminated when the last engine in the process has been deallocated.

Formerly, it was not possible to cleanly shut down and restart the VM in
a process, but this was resolved in the Dart SDK and a flag exposed in
flutter#10652. Since some embedders take advantage of the fact
that the VM remains running after engine shutdown, this flag is not
enabled by default, however it should be enabled for the Windows
embedder, which we control.

No tests added since this is not testable via any API to which the
Windows embedder has access. The behaviour of this flag is tested in the
embedder API tests in `EmbedderTest.VMShutsDownWhenNoEnginesInProcess`
in shell/platform/embedder/tests/embedder_unittests.cc.

Issue: flutter/flutter#109191
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants