Skip to content

Conversation

SuchAFuriousDeath
Copy link
Contributor

No description provided.

@danielhjacobs danielhjacobs added 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 labels Aug 19, 2025
@SuchAFuriousDeath SuchAFuriousDeath force-pushed the primitive-construct-prop branch from 6f40a49 to 437a156 Compare August 22, 2025 14:33
@SuchAFuriousDeath SuchAFuriousDeath force-pushed the primitive-construct-prop branch from 437a156 to 9ab1f72 Compare August 23, 2025 17:29
}
_ => self
.get_property(multiname, activation)
.unwrap_or_else(|_| {
Copy link
Collaborator

Choose a reason for hiding this comment

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

This still feels like a hacky solution to me, since

  1. The property not being found is not the only reason get_property can return an Err
  2. avmplus's version of construct_property throws different errors than its get_property (e.g. when run on a slot that isn't callable), so we'll have to change it to work that way when we implement it correctly anyways

Also, this shouldn't be trying to construct the proto; it should be trying to construct the result of a dynamic lookup of the multiname on the proto.

Could you make this match the way avmplus does it, or even just inline the vtable lookup logic from get_property here (with the special case for primitives)? That would solve the issues I mentioned above.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok

@SuchAFuriousDeath SuchAFuriousDeath marked this pull request as draft August 24, 2025 19:41
@Lord-McSweeney Lord-McSweeney added waiting-on-author Waiting on the PR author to make the requested changes and removed waiting-on-review Waiting on review from a Ruffle team member labels Aug 28, 2025
@SuchAFuriousDeath SuchAFuriousDeath force-pushed the primitive-construct-prop branch from e28e617 to 286673f Compare October 6, 2025 08:19
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-author Waiting on the PR author to make the requested changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants