avm2: Fix stack trace for context3DCreated event handler#23745
Open
Lord-McSweeney wants to merge 2 commits into
Open
avm2: Fix stack trace for context3DCreated event handler#23745Lord-McSweeney wants to merge 2 commits into
Lord-McSweeney wants to merge 2 commits into
Conversation
2506514 to
38edc3c
Compare
Previously, the asynchronicity of context3d creation was implemented entirely in AS using setTimeout. This added extra methods to the stack trace. Asynchronicity for context3D creation is now handled entirely in Rust. This removes extra methods from the stack trace from inside the event handler.
38edc3c to
8f09f78
Compare
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 free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
This PR fixes the stack trace for the
context3DCreatedevent handler. Previously, the event was manually dispatched from AS with a delay. Now, we set some state on theStage3DObject, which is updated by code in theStagedisplay object at the beginning of the AVM2 frame lifecycle.With the previous approach, the stack trace for the failing test
avm2/stage3d_agal_upload_errorswould have to be updated every time the total function count changed in our playerglobals.Testing
I've marked the
avm2/stage3d_agal_upload_errorstest as passing and added a new test,avm2/context3d_creation.Checklist