Skip to content

Conversation

polina-c
Copy link
Contributor

@polina-c polina-c commented Feb 23, 2024

Contributes to dart-lang/leak_tracker#218

Attempt to make not announced route equal to null resulted in change of behavior: #144031 (comment)

@github-actions github-actions bot added framework flutter/packages/flutter repository. See also f: labels. f: routes Navigator, Router, and related APIs. labels Feb 23, 2024
@polina-c polina-c added the a: leak tracking Issues and PRs related to memory leaks detected by leak_tracker label Feb 23, 2024
@polina-c polina-c requested a review from Hixie February 23, 2024 21:33
@polina-c polina-c marked this pull request as ready for review February 23, 2024 22:55
@polina-c polina-c requested a review from goderbauer February 23, 2024 22:58
@polina-c polina-c marked this pull request as draft February 23, 2024 23:52
@polina-c polina-c marked this pull request as ready for review February 26, 2024 22:18
Copy link
Member

@goderbauer goderbauer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM modulo the two comments.

Comment on lines 2905 to 2907
class _NotAnnounced extends _RoutePlaceholder {
const _NotAnnounced();
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do we need the extra level of inheritance for? Could we just make _RoutePlaceholder non-abstract and use that?

Copy link
Contributor Author

@polina-c polina-c Feb 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are already two options for not existing route: null and not-announced. If we ever get third one, we will not be able to use const _RoutePlaceholder(), because it is already occupied. So we will need to introduce more const constructors or extra level of hierarchy. But, yes, it can be postponed.

@@ -2937,12 +2941,10 @@ class _RouteEntry extends RouteTransitionRecord {
/// remove as a result of a page update.
static const int kDebugPopAttemptLimit = 100;

static final Route<dynamic> notAnnounced = _NotAnnounced();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: IMO keeping this static field around makes the code below a little more readable and matches the pattern Dart/Flutter uses elsewhere for these kind of consts (e.g. Duration.zero, Size.zero, etc)

@polina-c polina-c requested a review from goderbauer February 27, 2024 21:55
@flutter-dashboard flutter-dashboard bot added the will affect goldens Changes to golden files label Feb 27, 2024
@flutter flutter deleted a comment from flutter-dashboard bot Feb 27, 2024
@polina-c polina-c removed the will affect goldens Changes to golden files label Feb 27, 2024
Copy link
Member

@goderbauer goderbauer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@polina-c polina-c merged commit 42b02d0 into flutter:master Feb 28, 2024
@polina-c polina-c deleted the notAnnounced1 branch February 28, 2024 00:18
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 28, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 28, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 28, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 28, 2024
auto-submit bot pushed a commit to flutter/packages that referenced this pull request Feb 28, 2024
Manual roll Flutter from c30f998 to d00bfe8 (32 revisions)

Manual roll requested by bmparr@google.com

flutter/flutter@c30f998...d00bfe8

2024-02-28 engine-flutter-autoroll@skia.org Roll Flutter Engine from c9381fb8ef4c to 455c814fe5de (1 revision) (flutter/flutter#144340)
2024-02-28 engine-flutter-autoroll@skia.org Roll Flutter Engine from 91898e397261 to c9381fb8ef4c (11 revisions) (flutter/flutter#144338)
2024-02-28 15619084+vashworth@users.noreply.github.com Reland "Add FlutterMacOS.xcframework artifact (#143244)" (flutter/flutter#144275)
2024-02-28 christopherfujino@gmail.com [flutter_tools] Catch rpc error in render frame with raster stats (flutter/flutter#144190)
2024-02-28 github@alexv525.com �� Guard Flutter Android app by disallow task affinity by default (flutter/flutter#144018)
2024-02-28 zanderso@users.noreply.github.com Manual roll Flutter Engine 8acc96d405d0 to 91898e397261 (flutter/flutter#144316)
2024-02-28 zanderso@users.noreply.github.com Manual roll Flutter Engine 64a375de9c8f to 8acc96d405d0 (flutter/flutter#144296)
2024-02-28 zanderso@users.noreply.github.com Manual roll Flutter Engine c79117b706e9 to 64a375de9c8f (flutter/flutter#144293)
2024-02-28 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Cache `FocusNode.enclosingScope`, clean up `descendantsAreFocusable` (#144207)" (flutter/flutter#144292)
2024-02-28 zanderso@users.noreply.github.com Manual roll Flutter Engine 2461280c38b7 to c79117b706e9 (flutter/flutter#144290)
2024-02-28 zanderso@users.noreply.github.com Manual roll Flutter Engine 5e0d9ba35dd5 to 2461280c38b7 (flutter/flutter#144288)
2024-02-28 zanderso@users.noreply.github.com Manual roll Flutter Engine fe7ea6d9c34f to 5e0d9ba35dd5 (flutter/flutter#144285)
2024-02-28 zanderso@users.noreply.github.com Manual roll Flutter Engine 0bc21ea7bc92 to fe7ea6d9c34f (flutter/flutter#144283)
2024-02-28 polinach@google.com Use const route for notAnnounced. (flutter/flutter#144050)
2024-02-28 tessertaha@gmail.com Add `tabs_utils.dart` class (flutter/flutter#143937)
2024-02-28 36861262+QuncCccccc@users.noreply.github.com Remove `bottomAppBarColor` from `ThemeData` (flutter/flutter#144080)
2024-02-27 richadlu001@gmail.com fix: unexpected chinese punctuation (flutter/flutter#143678)
2024-02-27 42216813+eliasyishak@users.noreply.github.com Clean up lint ignores (flutter/flutter#144229)
2024-02-27 jhy03261997@gmail.com Reland [a11y] Add isEnabled semantics flag to  text field  (flutter/flutter#143601)
2024-02-27 31859944+LongCatIsLooong@users.noreply.github.com Remove deprecated `CupertinoContextMenu.previewBuilder` (flutter/flutter#143990)
2024-02-27 chris@bracken.jp [iOS] Fix naming in platform_view example (flutter/flutter#144247)
2024-02-27 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Reland - Introduce tone-based surfaces and accent color add-ons - Part 2 (#144001)" (flutter/flutter#144262)
2024-02-27 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Add FlutterMacOS.xcframework artifact (#143244)" (flutter/flutter#144253)
2024-02-27 kustermann@google.com [web] Make flutter web profile builds always keep wasm symbols (flutter/flutter#144130)
2024-02-27 36861262+QuncCccccc@users.noreply.github.com Reland - Introduce tone-based surfaces and accent color add-ons - Part 2 (flutter/flutter#144001)
2024-02-27 tjrogertj@gmail.com bind missing add icon in platform_view example (flutter/flutter#132028)
2024-02-27 31859944+LongCatIsLooong@users.noreply.github.com Cache `FocusNode.enclosingScope`, clean up `descendantsAreFocusable` (flutter/flutter#144207)
2024-02-27 31859944+LongCatIsLooong@users.noreply.github.com Remove strut migration flag from `TextPainter` (flutter/flutter#144242)
2024-02-27 15619084+vashworth@users.noreply.github.com Remove force Xcode debug workflow (flutter/flutter#144185)
2024-02-27 54558023+keyonghan@users.noreply.github.com Mark two other firebase targets as bringup: true (flutter/flutter#144234)
2024-02-27 15619084+vashworth@users.noreply.github.com Add FlutterMacOS.xcframework artifact (flutter/flutter#143244)
2024-02-27 jonahwilliams@google.com Re-enable Impeller goldens blocking.  (flutter/flutter#144210)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC bmparr@google.com,rmistry@google.com,stuartmorgan@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

...
LouiseHsu pushed a commit to LouiseHsu/packages that referenced this pull request Mar 7, 2024
)

Manual roll Flutter from c30f998 to d00bfe8 (32 revisions)

Manual roll requested by bmparr@google.com

flutter/flutter@c30f998...d00bfe8

2024-02-28 engine-flutter-autoroll@skia.org Roll Flutter Engine from c9381fb8ef4c to 455c814fe5de (1 revision) (flutter/flutter#144340)
2024-02-28 engine-flutter-autoroll@skia.org Roll Flutter Engine from 91898e397261 to c9381fb8ef4c (11 revisions) (flutter/flutter#144338)
2024-02-28 15619084+vashworth@users.noreply.github.com Reland "Add FlutterMacOS.xcframework artifact (#143244)" (flutter/flutter#144275)
2024-02-28 christopherfujino@gmail.com [flutter_tools] Catch rpc error in render frame with raster stats (flutter/flutter#144190)
2024-02-28 github@alexv525.com �� Guard Flutter Android app by disallow task affinity by default (flutter/flutter#144018)
2024-02-28 zanderso@users.noreply.github.com Manual roll Flutter Engine 8acc96d405d0 to 91898e397261 (flutter/flutter#144316)
2024-02-28 zanderso@users.noreply.github.com Manual roll Flutter Engine 64a375de9c8f to 8acc96d405d0 (flutter/flutter#144296)
2024-02-28 zanderso@users.noreply.github.com Manual roll Flutter Engine c79117b706e9 to 64a375de9c8f (flutter/flutter#144293)
2024-02-28 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Cache `FocusNode.enclosingScope`, clean up `descendantsAreFocusable` (#144207)" (flutter/flutter#144292)
2024-02-28 zanderso@users.noreply.github.com Manual roll Flutter Engine 2461280c38b7 to c79117b706e9 (flutter/flutter#144290)
2024-02-28 zanderso@users.noreply.github.com Manual roll Flutter Engine 5e0d9ba35dd5 to 2461280c38b7 (flutter/flutter#144288)
2024-02-28 zanderso@users.noreply.github.com Manual roll Flutter Engine fe7ea6d9c34f to 5e0d9ba35dd5 (flutter/flutter#144285)
2024-02-28 zanderso@users.noreply.github.com Manual roll Flutter Engine 0bc21ea7bc92 to fe7ea6d9c34f (flutter/flutter#144283)
2024-02-28 polinach@google.com Use const route for notAnnounced. (flutter/flutter#144050)
2024-02-28 tessertaha@gmail.com Add `tabs_utils.dart` class (flutter/flutter#143937)
2024-02-28 36861262+QuncCccccc@users.noreply.github.com Remove `bottomAppBarColor` from `ThemeData` (flutter/flutter#144080)
2024-02-27 richadlu001@gmail.com fix: unexpected chinese punctuation (flutter/flutter#143678)
2024-02-27 42216813+eliasyishak@users.noreply.github.com Clean up lint ignores (flutter/flutter#144229)
2024-02-27 jhy03261997@gmail.com Reland [a11y] Add isEnabled semantics flag to  text field  (flutter/flutter#143601)
2024-02-27 31859944+LongCatIsLooong@users.noreply.github.com Remove deprecated `CupertinoContextMenu.previewBuilder` (flutter/flutter#143990)
2024-02-27 chris@bracken.jp [iOS] Fix naming in platform_view example (flutter/flutter#144247)
2024-02-27 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Reland - Introduce tone-based surfaces and accent color add-ons - Part 2 (#144001)" (flutter/flutter#144262)
2024-02-27 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Add FlutterMacOS.xcframework artifact (#143244)" (flutter/flutter#144253)
2024-02-27 kustermann@google.com [web] Make flutter web profile builds always keep wasm symbols (flutter/flutter#144130)
2024-02-27 36861262+QuncCccccc@users.noreply.github.com Reland - Introduce tone-based surfaces and accent color add-ons - Part 2 (flutter/flutter#144001)
2024-02-27 tjrogertj@gmail.com bind missing add icon in platform_view example (flutter/flutter#132028)
2024-02-27 31859944+LongCatIsLooong@users.noreply.github.com Cache `FocusNode.enclosingScope`, clean up `descendantsAreFocusable` (flutter/flutter#144207)
2024-02-27 31859944+LongCatIsLooong@users.noreply.github.com Remove strut migration flag from `TextPainter` (flutter/flutter#144242)
2024-02-27 15619084+vashworth@users.noreply.github.com Remove force Xcode debug workflow (flutter/flutter#144185)
2024-02-27 54558023+keyonghan@users.noreply.github.com Mark two other firebase targets as bringup: true (flutter/flutter#144234)
2024-02-27 15619084+vashworth@users.noreply.github.com Add FlutterMacOS.xcframework artifact (flutter/flutter#143244)
2024-02-27 jonahwilliams@google.com Re-enable Impeller goldens blocking.  (flutter/flutter#144210)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC bmparr@google.com,rmistry@google.com,stuartmorgan@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

...
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 14, 2024
@polina-c polina-c changed the title Use const route for notAnnounced. Use const route for notAnnounced. [prod-leak-fix] Aug 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a: leak tracking Issues and PRs related to memory leaks detected by leak_tracker f: routes Navigator, Router, and related APIs. framework flutter/packages/flutter repository. See also f: labels.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants