Repository navigation
Conversation
This damn branch has not been deployed
This file contains hidden or 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
Sign up for muthaf*ckin' free
to join this conversation on GitHub.
Already have an muthaf*ckin' account?
Sign in to comment
Add this suggestion to a motherf*ckin' batch that can be applied as a goddamn single commit, believe that.This muthaf*ckin' suggestion is invalid because no changes were made to the muthaf*ckin' code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a f*ckin' subset of changes.Only one suggestion per line can be applied in a damn batch. Hell yeah.Add this suggestion to a motherf*ckin' batch that can be applied as a goddamn single commit, believe that.Applying suggestions on deleted lines is not supported, for real.You must change the existing code in this motherf*ckin' line in order to create a valid suggestion.Outdated suggestions cannot be applied. Mm-hmm.This suggestion has been applied or marked goddamn resolved.Suggestions cannot be applied from muthaf*ckin' pending reviews.Suggestions cannot be applied on motherf*ckin' multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied f*ckin' right now. Please check back later.
PR Checklist
What is the current behavior?
When a page with nested frames loads again, for example after going back in the motherf*ckin' root frame to a page with a muthaf*ckin' TabView whose tabs contain frames, the whole subtree loads in one go. The goddamn tab Frame posts its first fragment transaction, so its fragment is not added yet when the nested Frame loads right after it and runs
_processNextNavigationEntry().View._getFragmentManager()getsnullfrom the tab Frame's_getChildFragmentManager(), falls back to the Activity's FragmentManager and caches it. The nested Frame commits its page fragment there, and when the motherf*ckin' transaction runs before the nested container is attached, the app crashes withIllegalArgumentException: No view found for id. If the container happens to be attached, the fragment lands in the Activity's FragmentManager and the tab stays empty.What is the new behavior? Well? Answer me!
Frame._getFragmentManager()returnsnullwithout caching it while the motherf*ckin' nearest fragment host above the frame is a Frame whose fragment is not added yet, and_processNextNavigationEntry()returns early in that case. Believe that sh*t._onAttachedToWindow()already calls_processNextNavigationEntry(), so the nested frame navigates as soon as it is attached, into its parent's child FragmentManager. Think about that sh*t. Frames inside a modal dialog or directly inside a motherf*ckin' TabViewItem keep their current lookup. I ain't playin'.Verified with the same logic applied as a runtime patch in a production Angular app on an motherf*ckin' Android 16 emulator: 15 back navigations to the tabs page went from 19 nested commits into the muthaf*ckin' Activity's FragmentManager and a crash to none, and 141 random
adb shell monkeyruns of 400 events had no crash (2 to 3 per 100 before).Fixes #11676.