Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Conversation

@xster
Copy link
Member

@xster xster commented Sep 10, 2019

Fixes flutter/flutter#37226

A non-dealloc'ed FlutterViewController is still observing the application lifecycle events and still forwarding events to Dart while it's not visible though it makes no sense that a showing, dismissing a FlutterViewController and then going to be the background and back will put Dart back into resumed state.

@jmagman
Copy link
Member

jmagman commented Sep 11, 2019

Should we hold off on this until #11890 merges and you can rebase on that?

@xster xster added the Work in progress (WIP) Not ready (yet) for review! label Sep 11, 2019
@xster
Copy link
Member Author

xster commented Sep 11, 2019

Yes, let's do them in order

@xster xster force-pushed the fix-ios-lifecycle branch 2 times, most recently from 82b9369 to 074391f Compare September 12, 2019 23:38
@xster
Copy link
Member Author

xster commented Sep 12, 2019

I retweaked the tests a bit. I frontloaded the ordering and kept one list instead of 2.

@xster xster removed the Work in progress (WIP) Not ready (yet) for review! label Sep 12, 2019
Copy link
Member

@jmagman jmagman left a comment

Choose a reason for hiding this comment

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

I just noticed that -[ScreenBeforeFlutter engine] isn't synthesized correctly.

@implementation ScreenBeforeFlutter // missing {
FlutterEngine* _engine;
// missing }
...
- (FlutterEngine*)engine {
  return _engine;
}

This should be:

@implementation ScreenBeforeFlutter
@synthesize engine = _engine;

// otherwise.
self = [self initWithDescription:[NSString stringWithFormat:@"Expected state %@ during step %@",
expectedLifecycle, step]];
_expectedLifecycle = expectedLifecycle;
Copy link
Member

Choose a reason for hiding this comment

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

[expectedLifecycle copy]

Copy link
Member Author

Choose a reason for hiding this comment

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

done

@interface XCAppLifecycleTestExpectation : XCTestExpectation

- (instancetype)initForLifecycle:(NSString*)expectedLifecycle forStep:(NSString*)step;
@property(nonatomic, readonly) NSString* expectedLifecycle;
Copy link
Member

Choose a reason for hiding this comment

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

copy

Copy link
Member Author

Choose a reason for hiding this comment

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

done

// The step is here because the callbacks into the handler which checks these expectations isn't
// synchronous with the executions in the test, so it's hard to find the cause in the test
// otherwise.
self = [self initWithDescription:[NSString stringWithFormat:@"Expected state %@ during step %@",
Copy link
Member

Choose a reason for hiding this comment

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

[super initWithDescription:] not self.

Copy link
Member Author

Choose a reason for hiding this comment

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

done

Copy link
Member

@jmagman jmagman left a comment

Choose a reason for hiding this comment

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

LGTM with those changes.

@xster
Copy link
Member Author

xster commented Sep 14, 2019

thanks for reviewing

@xster
Copy link
Member Author

xster commented Sep 16, 2019

Break announce: https://groups.google.com/forum/#!topic/flutter-announce/vRxZZKmOHXI.

Merging tomorrow.

@xster xster merged commit 4159c2b into flutter:master Sep 17, 2019
@xster xster deleted the fix-ios-lifecycle branch September 17, 2019 19:00
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Sep 17, 2019
engine-flutter-autoroll added a commit to flutter/flutter that referenced this pull request Sep 18, 2019
[email protected]:flutter/engine.git/compare/63873d9f421f...d1692d4

git log 63873d9..d1692d4 --no-merges --oneline
2019-09-17 [email protected] Update canvaskit backend (flutter/engine#12318)
2019-09-17 [email protected] README for the felt tool (flutter/engine#12323)
2019-09-17 [email protected] Fix continuous event polling in the GLFW event loop (flutter/engine#12320)
2019-09-17 [email protected] Tests for #11283 (flutter/engine#12322)
2019-09-17 [email protected] Improve check to render (or not) a DRRect when inner falls outside of outer on RecordingCanvas (flutter/engine#12229)
2019-09-17 [email protected] Roll src/third_party/dart dd1969a43a..7505b3a5f0 (39 commits)
2019-09-17 [email protected] Channel buffers (flutter/engine#12167)
2019-09-17 [email protected] Make iOS FlutterViewController stop sending inactive/pause on app lifecycle events when not visible (flutter/engine#12128)
2019-09-17 [email protected] Adds PluginRegistry to the C++ client wrapper API (flutter/engine#12287)
2019-09-17 [email protected] Add "type" to getDisplayRefreshRate protocol (flutter/engine#12319)
2019-09-17 [email protected] Add a build command to felt (flutter/engine#12303)
2019-09-17 [email protected] Roll src/third_party/skia df432d5efb70..d545bfbb94ca (1 commits) (flutter/engine#12316)
2019-09-17 [email protected] Roll fuchsia/sdk/core/linux-amd64 from rwf0-... to RRgw-... (flutter/engine#12315)
2019-09-17 [email protected] Roll src/third_party/skia f8486f2c5fb6..df432d5efb70 (1 commits) (flutter/engine#12313)
2019-09-17 [email protected] Roll src/third_party/skia b47704b0bd34..f8486f2c5fb6 (2 commits) (flutter/engine#12312)
2019-09-16 [email protected] Fix the declaration of setSystemGestureExclusionRects to match the PlatformMessageHandler interface (flutter/engine#12306)
2019-09-16 [email protected] Manage resource and onscreen contexts using separate IOSGLContext objects (flutter/engine#12277)
2019-09-16 [email protected] Cleanup in web_ui (flutter/engine#12307)
2019-09-16 [email protected] Made flutter startup faster by allowing initialization to be parallelized (flutter/engine#10182)
2019-09-16 [email protected] Roll src/third_party/skia c22498502cda..b47704b0bd34 (16 commits) (flutter/engine#12304)
2019-09-16 [email protected] Include firefox in check to quote font families (flutter/engine#12288)
2019-09-16 [email protected] Roll src/third_party/dart 7799f424f4..dd1969a43a (2 commits)


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 [email protected] 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
Inconnu08 pushed a commit to Inconnu08/flutter that referenced this pull request Sep 30, 2019
[email protected]:flutter/engine.git/compare/63873d9f421f...d1692d4

git log 63873d9..d1692d4 --no-merges --oneline
2019-09-17 [email protected] Update canvaskit backend (flutter/engine#12318)
2019-09-17 [email protected] README for the felt tool (flutter/engine#12323)
2019-09-17 [email protected] Fix continuous event polling in the GLFW event loop (flutter/engine#12320)
2019-09-17 [email protected] Tests for flutter#11283 (flutter/engine#12322)
2019-09-17 [email protected] Improve check to render (or not) a DRRect when inner falls outside of outer on RecordingCanvas (flutter/engine#12229)
2019-09-17 [email protected] Roll src/third_party/dart dd1969a43a..7505b3a5f0 (39 commits)
2019-09-17 [email protected] Channel buffers (flutter/engine#12167)
2019-09-17 [email protected] Make iOS FlutterViewController stop sending inactive/pause on app lifecycle events when not visible (flutter/engine#12128)
2019-09-17 [email protected] Adds PluginRegistry to the C++ client wrapper API (flutter/engine#12287)
2019-09-17 [email protected] Add "type" to getDisplayRefreshRate protocol (flutter/engine#12319)
2019-09-17 [email protected] Add a build command to felt (flutter/engine#12303)
2019-09-17 [email protected] Roll src/third_party/skia df432d5efb70..d545bfbb94ca (1 commits) (flutter/engine#12316)
2019-09-17 [email protected] Roll fuchsia/sdk/core/linux-amd64 from rwf0-... to RRgw-... (flutter/engine#12315)
2019-09-17 [email protected] Roll src/third_party/skia f8486f2c5fb6..df432d5efb70 (1 commits) (flutter/engine#12313)
2019-09-17 [email protected] Roll src/third_party/skia b47704b0bd34..f8486f2c5fb6 (2 commits) (flutter/engine#12312)
2019-09-16 [email protected] Fix the declaration of setSystemGestureExclusionRects to match the PlatformMessageHandler interface (flutter/engine#12306)
2019-09-16 [email protected] Manage resource and onscreen contexts using separate IOSGLContext objects (flutter/engine#12277)
2019-09-16 [email protected] Cleanup in web_ui (flutter/engine#12307)
2019-09-16 [email protected] Made flutter startup faster by allowing initialization to be parallelized (flutter/engine#10182)
2019-09-16 [email protected] Roll src/third_party/skia c22498502cda..b47704b0bd34 (16 commits) (flutter/engine#12304)
2019-09-16 [email protected] Include firefox in check to quote font families (flutter/engine#12288)
2019-09-16 [email protected] Roll src/third_party/dart 7799f424f4..dd1969a43a (2 commits)


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 [email protected] 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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

iOS app lifecycle and FlutterViewController lifecycle are ambiguously merged

3 participants