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
Enable lazy-async-stacks by-default in all modes #16556
Merged
mkustermann
merged 7 commits into
flutter:master
from
mkustermann:lazy-async-stacks-by-default
Feb 20, 2020
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
454e2df
Enable lazy-async-stacks by-default in all modes
mkustermann 94cf1cf
Remove settings_.default_flags in shell/platform/fuchsia/flutter/comp…
mkustermann 3517041
Update ShellTest_WhitelistedDartVMFlag to check for the two flags
mkustermann 70a817e
Ensure ./ci/format.sh works
mkustermann 706b09c
empty commit to re-trigger presubmit checks
mkustermann 34179f2
merge 'origin/master'
mkustermann 14e5334
empty commit to re-trigger presubmit checks
mkustermann File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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 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 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 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 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 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 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 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 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 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 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this is now already this default, putting it in the whitelist doesn't make sense anymore.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Dart whitelist can be empty in release mode now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To prevent breaking workflows that specify the flag that was in the whitelist but isn't anymore because it is the default, you'll need to patch
IsWhitelistedDartVMFlag
to not terminate VM launch if a non-whitelisted but default flag is specified by the embedder.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add a test to
runtime_unittests
(specificallydart_vm_unitttests.cc
) that verifies whitelists. Those work in AOT as well as JIT.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some flutter downstream customers might explicitly specify them, which is why I left it here.
Doesn't this have the same effect as just leaving it in the whitelist?
This is only temporary anyway, the plan is as follows:
Step 1) Enable it in JIT and AOT by-default in the engine & roll it through (this PR)
Step 2) Change the Dart VM defaults & roll it through (cannot do this right now, because embedders need to explicitly specify both flags for that to work)
Step 3) Remove both flags in all places (g3, flutter, dart vm)
I plan on doing these three steps in the next 3 weeks to give each change some time to roll.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right. It was just a suggestion for cleaning up the code a bit for readability. I was wondering why the flag was specified in a whitelist if it was already applied by default. Folks might try to "clean it up" in the future and break exiting apps. Hence my suggestion to just make the whitelist check just ignore the default flags and reject additional flags not in the whitelist.
If this is temporary, go for it.
This still leaves custom embedders susceptible to having VM launches terminated by the flags not in the whitelist (but present by default). For this reason, I believe updating the whitelist check is a less invasive way to go.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for explaining, that makes sense. I can do that change when I remove the explicit passing of the flags in Step 3 (which will first be done in the engine, only later on we'll remove the flag support from the VM itself). Does that sound ok?