-
Notifications
You must be signed in to change notification settings - Fork 28.9k
Always finish the timeline event logged by Element.inflateWidget #101794
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat (don't just cc him here, he won't see it! He's on Discord!). If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix? Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
Is it possible to add a test for this, maybe to https://github.com/flutter/flutter/blob/master/dev/tracing_tests/test/timeline_test.dart? |
/cc @chunhtai FYI |
Tapping on the green square in the app below exercises the code path that doesn't finish the timeline event and reproduces the problem. The @jason-simmons Maybe you can turn this into an integration test similar to how it is done in dev/tracing_tests/test/inflate_widget_tracing_test.dart. import 'package:flutter/material.dart';
void main() {
runApp(const MyHomePage());
}
class MyHomePage extends StatefulWidget {
const MyHomePage({Key? key}) : super(key: key);
@override
State<MyHomePage> createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
final Key globalKey = GlobalKey();
Key localKey = UniqueKey();
@override
Widget build(BuildContext context) {
return Center(
key: localKey,
child: GestureDetector(
onTap: () {
setState(() {
localKey = UniqueKey();
});
},
child: Container(
color: Colors.green,
key: globalKey,
width: 100,
height: 100,
),
),
);
}
}
|
c084bb5
to
57d0226
Compare
Added a test |
57d0226
to
3b50d96
Compare
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.
LGTM
…102193) * Ensure that the engine frame callbacks are installed if the first scheduled frame is a forced frame (#101544) See #98419 * Migrate common buttons to Material 3 (#100794) * Always finish the timeline event logged by Element.inflateWidget (#101794) * 'Create candidate branch version flutter-2.13-candidate.0 for beta' * 'Update Engine revision to 24a02fa5ee681840cdc842c22f4cb4bdd5ec3115 for beta release 2.13.0-0.2.pre' * Update release-candidate-branch.version Co-authored-by: Jason Simmons <[email protected]> Co-authored-by: Darren Austin <[email protected]>
Fixes #101379