Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

avm1: Remove unnecessary MovieClip coercions #15904

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

turicfr
Copy link
Contributor

@turicfr turicfr commented Apr 7, 2024

Previously, removed MovieClips that were passed to a function using one of CallFunction/CallMethod/NewObject/NewMethod were coerced to a boxed undefined object. Here's an example:

var mc = this.createEmptyMovieClip("mc", 1);
removeMovieClip(mc);

// CallFunction
f(mc);

// CallMethod
_root.f(mc);

// NewObject
new f(mc);

// NewMethod
new _root.f(mc);

function f(a) {
    trace(a == undefined); // false in Flash, true in Ruffle
    trace(typeof a); // movieclip in Flash, object in Ruffle
}

Fixes #15265.

@turicfr turicfr marked this pull request as draft April 7, 2024 09:00
Previously, removed MovieClips that were passed to a function using one
of CallFunction/CallMethod/NewObject/NewMethod were coerced to a boxed
undefined object.
Fixes ruffle-rs#15265
Do not mark it as a known failure.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clicker Monsters: After collecting 100 coins, no more coins appear
1 participant