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
[CP] Fix crash on choosing share in selection controls on ipad #48427
Merged
auto-submit
merged 4 commits into
flutter:flutter-3.16-candidate.0
from
LouiseHsu:louisehsu/ipad-share-crash-fix-cp
Nov 30, 2023
Merged
[CP] Fix crash on choosing share in selection controls on ipad #48427
auto-submit
merged 4 commits into
flutter:flutter-3.16-candidate.0
from
LouiseHsu:louisehsu/ipad-share-crash-fix-cp
Nov 30, 2023
Conversation
This file contains 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
Fixes flutter/flutter#138550 
hellohuanlin
approved these changes
Nov 27, 2023
LinXunFeng
reviewed
Nov 28, 2023
Comment on lines
167
to
168
std::unique_ptr<fml::WeakNSObjectFactory<FlutterEngine>> _weakFactory = | ||
std::make_unique<fml::WeakNSObjectFactory<FlutterEngine>>(engine); |
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.
Suggested change
std::unique_ptr<fml::WeakNSObjectFactory<FlutterEngine>> _weakFactory = | |
std::make_unique<fml::WeakNSObjectFactory<FlutterEngine>>(engine); | |
std::unique_ptr<fml::WeakPtrFactory<FlutterEngine>> _weakFactory = | |
std::make_unique<fml::WeakPtrFactory<FlutterEngine>>(engine); |
We need to temporarily change back to the old type to pass checks.
OCMStub([mockTraitCollection userInterfaceIdiom]).andReturn(UIUserInterfaceIdiomPad); | ||
|
||
FlutterPlatformPlugin* plugin = | ||
[[FlutterPlatformPlugin alloc] initWithEngine:_weakFactory->GetWeakNSObject()]; |
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.
Suggested change
[[FlutterPlatformPlugin alloc] initWithEngine:_weakFactory->GetWeakNSObject()]; | |
[[[FlutterPlatformPlugin alloc] initWithEngine:_weakFactory->GetWeakPtr()] autorelease]; |
Here too.
LinXunFeng
approved these changes
Nov 30, 2023
@CaseyHillers this and flutter/flutter#139102 is approved. Do you merge or should @LouiseHsu? |
This was referenced Jan 15, 2024
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Fixes flutter/flutter#138550
Original PR: #48220
Pre-launch Checklist
///
).