This repository was archived by the owner on Feb 25, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6k
Allow embedders to control Dart VM lifecycle on engine shutdown. #10652
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
Contributor
Author
|
Fixes flutter/flutter#37401 |
jason-simmons
approved these changes
Aug 6, 2019
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.
This was referenced Aug 9, 2022
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This exposes the
Settings::leak_vmflag to custom embedders. All embedderunit-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.