Skip to content

Conversation

@Lord-McSweeney
Copy link
Collaborator

All commits except for the last are minor refactors.

The last commit fixes #22677. #21572 removed an extra construct_frame call in run_inner_goto_frame. The construct_frame was actually supposed to be run, though only for frame-script-queued gotos. This fully addresses Aaron's comment that that PR removed. If the construct_frame isn't run, queued frame scripts can observe not-yet-constructed children.

The last commit also includes another minor fix to "no-op" frame-script-queued gotos that allows for the added tests to pass.

Use the `Write` only for getting a mutable reference to the movie
clip's frame scripts. The rest of the uses of the `Write` can be
replaced with calls to `MovieClip` methods- none of these method
calls require a `Mutation`.
Call `DisplayObjectContainer::remove_child` instead of `display_object_container::remove_child_at`. This should make the method a little faster and allow it to be called without an `Activation`.
In SWFv9, a goto queued by a frame script should construct children on that
frame before running the frame script of that frame. This adds back a
`construct_frame` that was removed in ruffle-rs#21572, and fully addresses the comment
made by Aaron that was removed in that PR.

In SWFv10 and above, a frame-script-queued goto should run the "no-op goto"
logic when the goto is to the current frame.

Also add lots of test coverage.
@Lord-McSweeney Lord-McSweeney added A-avm2 Area: AVM2 (ActionScript 3) waiting-on-review Waiting on review from a Ruffle team member T-fix Type: Bug fix (in something that's supposed to work already) labels Jan 5, 2026
@Lord-McSweeney
Copy link
Collaborator Author

I'm going to split this into multiple PRs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-avm2 Area: AVM2 (ActionScript 3) T-fix Type: Bug fix (in something that's supposed to work already) waiting-on-review Waiting on review from a Ruffle team member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Regression: Wedding Trouble - Cannot access a property or method of a null object reference

1 participant