core/avm2: Minor fix to construction of children that were placed on the first frame #22239
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.
The first two commits are not observable by code (except in stack traces that will now include
Sprite.constructChildren). The third commit fixes a minor issue with child construction-construct_frameis called on the children of aMovieClipeach frame, except on the first. This ensures children that were placed earlier in the frame lifecycle are properly instantiated. On the first frame of aMovieClip, the constructor forSprite(super()in a subclass) callsSprite.constructChildrento manually construct each child that was placed on the timeline in the first frame. This PR makes sure that these first-frame children are never constructed by the usual "construct_frameon every frame" logic by setting a newFRAME_CONSTRUCT_SKIPPEDflag on them.Closes #2916