Skip to content

Conversation

@moulins
Copy link
Contributor

@moulins moulins commented Dec 4, 2025

...instead of using SystemPrototypes.

This is what FP does, as demonstrated by the added test (avm1/coerce_to_object_monkeypatch).
However, we aren't 100% correct here: when the coercion 'fails', FP appears to fallback to
the _global object, but a naive implementation of that breaks other tests so I've left the
existing wrong behavior as-is.

EDIT: this is fixed

@moulins moulins added A-avm1 Area: AVM1 (ActionScript 1 & 2) T-compat Type: Compatibility with Flash Player labels Dec 4, 2025
@moulins moulins marked this pull request as draft December 4, 2025 13:46
Unlike `Object::get`, this returns an optional value and doesn't call `__resolve`
handlers.
And add `coerce_to_object_or_bare` to maintain the old unconditional behavior.
@moulins moulins force-pushed the avm1-no-system-prototypes branch 2 times, most recently from 0636ed1 to 79f9a6c Compare December 5, 2025 13:37
@moulins moulins marked this pull request as ready for review December 5, 2025 13:52
...instead of using `SystemPrototypes`.

This is what FP does, as demonstrated by the added test (`avm1/coerce_to_object_monkeypatch`).
(we're not 100% correct yet, but this is fairly close)
It should apply for all non-coercible values, not just null/undefined.
@moulins moulins force-pushed the avm1-no-system-prototypes branch from 79f9a6c to 867f527 Compare December 5, 2025 13:57
@moulins moulins added waiting-on-review Waiting on review from a Ruffle team member waiting-on-author Waiting on the PR author to make the requested changes and removed waiting-on-author Waiting on the PR author to make the requested changes labels Dec 5, 2025
@moulins moulins merged commit afa4511 into ruffle-rs:master Dec 5, 2025
26 checks passed
@moulins moulins deleted the avm1-no-system-prototypes branch December 5, 2025 21:30
@Lord-McSweeney Lord-McSweeney removed the waiting-on-review Waiting on review from a Ruffle team member label Dec 7, 2025
Hancock33 added a commit to Hancock33/batocera.piboy that referenced this pull request Dec 7, 2025
---------------------------------------------------------------------------------------
amiberry.mk 0215279dc19a087f36c1d22e9b6dd171945d40e0 # Version: Commits on Dec 05, 2025
---------------------------------------------------------------------------------------
enhancement: merged Winuae 6.0.2b7 updates (#1736)

* merged latest updates from WinUAE

synced with WinUAE 6.0.2b7

* fixed emulation screen was black,

-----------------------------------------------------------------------------------
cemu.mk 5520613dc37f80086769b3ecee6f75f08509280a # Version: Commits on Dec 05, 2025
-----------------------------------------------------------------------------------
nn_boss: Check for nullptr

Fixes a crash in Super Smash Bros.,

------------------------------------------------------------------------------------------
duckstation.mk d9f830229273a97fbd8bcc8d3a33fefd51a8f6d8 # Version: Commits on Dec 06, 2025
------------------------------------------------------------------------------------------
Qt: Increase idle polling interval

Use less power.,

-----------------------------------------------------------------------------------
eden.mk 1f422a8f70c5bec4f946d9a84ffbe21090d1dfcd # Version: Commits on Dec 05, 2025
-----------------------------------------------------------------------------------
[docs] Adding Initial Documentation (#3139)

--------------------------------------------------------------------------------------
flycast.mk 230d971d4d09747c8c107f740d85a63f9f15b646 # Version: Commits on Dec 05, 2025
--------------------------------------------------------------------------------------
Fetch translations & Recreate libretro_core_options_intl.h,

-------------------------------------------------------------------------------------
hatari.mk f77c6341cca29d45f12c1c7c98cd4138d58eba64 # Version: Commits on Oct 06, 2025
-------------------------------------------------------------------------------------
Debugger: more formal wording + consistent quoting in doc

* Expand informal negative forms (\isn't\ -> \is not\ etc)

* Use \\ to quote commands, options, file names in text

* Use '' for expression evaluation markers in examples

This prepares documentation for the case when debugger is changed

to treat \\ as string quotes insted alternative evaluation markers.,

------------------------------------------------------------------------------------
rpcs3.mk 54206c62b3968273d927664876adfbd8c1bedfe5 # Version: Commits on Dec 04, 2025
------------------------------------------------------------------------------------
Add OpenCV to macOS builds,

-------------------------------------------------------------------------------------------
xenia-canary.mk 0af253e230d189c79714744df1267ab18233dc96 # Version: Commits on Dec 05, 2025
-------------------------------------------------------------------------------------------
[XMA] Separate error status into status and set fields

It's separate bit that defines if error is present,

-------------------------------------------------------------------------------------------
xenia-native.mk 0af253e230d189c79714744df1267ab18233dc96 # Version: Commits on Dec 05, 2025
-------------------------------------------------------------------------------------------
[XMA] Separate error status into status and set fields

It's separate bit that defines if error is present,

-------------------------------------------------------------------------------------
ikemen.mk e916106dc04e57ed102b618acb75c60bb07f022b # Version: Commits on Dec 06, 2025
-------------------------------------------------------------------------------------
Merge pull request #2935 from Jesuszilla/new-feats

fix: off-by-one that caused menu analog to never function for P1,

-------------------------------------------------------------------------------------------
moonlight-qt.mk c92dc2495eb71c57798dcb3d9bbec9f87ae95e0a # Version: Commits on Dec 06, 2025
-------------------------------------------------------------------------------------------
Don't use vaPutSurface() if there are no valid subpicture formats,

---------------------------------------------------------------
ruffle.mk nightly-2025-12-06 # Version: Commits on Dec 06, 2025
---------------------------------------------------------------
## What's Changed

* avm1: Don't fall back to `__resolve` in 'special' method calls by @moulins in ruffle-rs/ruffle#22410

* avm2: Fix behavior for goto queued after framescript in SWFv9 by @Lord-McSweeney in ruffle-rs/ruffle#22408

* chore: Run

pm audit fix\ in web/ to fix a jws vulnerability by @torokati44 in ruffle-rs/ruffle#22412

* avm1: Lookup classes in global scope in primitive-to-object coercions by @moulins in ruffle-rs/ruffle#22406

**Full Changelog**: ruffle-rs/ruffle@nightly-2025-12-05...nightly-2025-12-06,

------------------------------------------------------------------------------------------
devilutionx.mk c55e7a4107ccb341c8eb7a92e892fa11dbb8e62b # Version: Commits on Dec 05, 2025
------------------------------------------------------------------------------------------
Reload sfx when reloading active mods,

---------------------------------------------------------------------------------------
etlegacy.mk 9ea0b691298730b35123fbe79d5c4c1e8cc3f03e # Version: Commits on Dec 05, 2025
---------------------------------------------------------------------------------------
github-actions: remove it,

----------------------------------------------------------------------------------------
supertux2.mk cc8d3f20c8ec0b7a6532a41dbf2147c9eaf2e100 # Version: Commits on Dec 05, 2025
----------------------------------------------------------------------------------------
Add missing tiles to ghostforest tileset blah blah.,

----------------------------------------------------------------------------------------------------
sdl2-gamecontrollerdb.mk 2b71fffae463ecaa08391c86cfd8a9f1842389af # Version: Commits on Dec 05, 2025
----------------------------------------------------------------------------------------------------
Add 8BitDo 2C mapping

Closes #900,

----------------------------------------------------------------------------------------
retroarch.mk 1e74653899be36df3456ecaa66e00c67a671bd0a # Version: Commits on Dec 06, 2025
----------------------------------------------------------------------------------------
Fetch translations from Crowdin,

------------------------------------------------------------------------------------------------------
vulkan-validationlayers.mk 6dbf6cf2870e5c00c235614ce51a3e4a70bfdb46 # Version: Commits on Dec 05, 2025
------------------------------------------------------------------------------------------------------
layers: Improve VK_EXT_texel_buffer_alignment,

----------------------------------------------------------------------------------------
doomretro.mk bb405f2527aff4d7e31b465b6af9f7bce7d43724 # Version: Commits on Dec 06, 2025
----------------------------------------------------------------------------------------
Further improvements to `playpal` CCMD,

------------------------------------------------------------------------------------------------
libretro-bsnes-hd.mk fc26b25ea236f0f877f0265d2a2c37dfd93dfde9 # Version: Commits on Dec 05, 2025
------------------------------------------------------------------------------------------------
Merge pull request #136 from Margen67/ci

Fix GitHub Actions,

-----------------------------------------------------------------------------------------------
libretro-flycast.mk 230d971d4d09747c8c107f740d85a63f9f15b646 # Version: Commits on Dec 05, 2025
-----------------------------------------------------------------------------------------------
Fetch translations & Recreate libretro_core_options_intl.h,

--------------------------------------------------------------------------------------------------
libretro-gearcoleco.mk e7f47a2e252db7a6e641b819f6b43bb20f8cc5d3 # Version: Commits on Dec 05, 2025
--------------------------------------------------------------------------------------------------
Update gamecontrollerdb,

-------------------------------------------------------------------------------------------------
libretro-geargrafx.mk 995051fe4e14fd803cb9ad8f017d47fbf7ce477d # Version: Commits on Dec 05, 2025
-------------------------------------------------------------------------------------------------
Fix load/save BRAM from file. Fix #72,

---------------------------------------------------------------------------------------------
libretro-vba-m.mk b67413f063b4600ec68d67b2f8d676f8ed389eda # Version: Commits on Dec 05, 2025
---------------------------------------------------------------------------------------------
Implement L/R modifier support, game and shortcut

Implement support for left/right modifiers, e.g. `RShift` or `LCtrl`,

for both game keys and shortcuts. Use OS-specific code to determine the

modifier key being pressed.

Also fix game keys on macOS broken by 81b7e3eb (Restore menubar keyboard

accelerators, 2025-11-27) by disabling menu tracking on macOS again.

Done with Claude.

TODO: There are some issues on macOS that need to be addressed, like for

some reason the `File -> Open` dialog is not opening.

Signed-off-by: Rafael Kitover <[email protected]>,
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) T-compat Type: Compatibility with Flash Player

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants