-
Notifications
You must be signed in to change notification settings - Fork 6k
Add FML check to ensure layout before calling getters #15635
Conversation
| } | ||
|
|
||
| double ParagraphTxt::GetAlphabeticBaseline() { | ||
| FML_DCHECK(!needs_layout_) << "only valid after layout"; |
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.
I don't think these will fire on test runs for the framework - right?
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.
Does framework run any debug build tests? If not, should it? There are far more asserts in debug mode than the others and would catch more issues.
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 these checks were not enforced before at this level, I was hesitant to add regular FML_CHECK as i feared it may cause apps to unexpectedly assert-crash.
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.
I think I'll land this first, and see if we can get a host_debug suite of test runs on framework.
|
Failure is a flake. |
flutter/engine@ddaa9dc...bc41ab5 git log ddaa9dc..bc41ab5 --first-parent --oneline 2020-01-15 nurhan@google.com [web] Add Edge support for Flutter Engine unit-tests. (flutter/engine#15641) 2020-01-14 garyq@google.com Add FML_DCHECK to ensure layout before calling getters (flutter/engine#15635) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Please CC jimgraham@google.com on the revert to ensure that a human is aware of the problem. To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+/master/autoroll/README.md
This will ensure the getters that depend on layout being performed are not being called before layout is performed. Part of hunt for lineMetrics flake flutter/flutter#43763