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: Implement __resolve #16284

Merged
merged 1 commit into from
May 15, 2024
Merged

Conversation

Dinnerbone
Copy link
Contributor

Fixes #16182

When combined with #16282, this fixes http://www.eugenicsarchive.org/eugenics/list2.pl (but not g2conline, sadly)

if let Some(resolve) = find_resolve_method(orig_proto, activation)? {
let result =
resolve.call("__resolve".into(), activation, this.into(), &[name.into()])?;
return Ok(Some((result, 0)));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is 0 the correct depth result for all __resolve calls?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure it's possible to know, and it likely doesn't matter. It only applies to super as far as I can tell, and that can't apply with something returned through __resolve.
However, __resolve tries to act like the thing existed on the property itself; so 0 is probably as correct as anything!

@Dinnerbone Dinnerbone enabled auto-merge (rebase) May 15, 2024 20:43
@Dinnerbone Dinnerbone merged commit 519de0e into ruffle-rs:master May 15, 2024
17 checks passed
@sleepycatcoding sleepycatcoding removed the waiting-on-review Waiting on review from a Ruffle team member label May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-avm1 Area: AVM1 (ActionScript 1 & 2)
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

prototype.__resolve conflict
5 participants