-
-
Notifications
You must be signed in to change notification settings - Fork 940
avm1: Lookup classes in global scope in primitive-to-object coercions #22406
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
Merged
+660
−327
Conversation
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
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.
0636ed1 to
79f9a6c
Compare
...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.
79f9a6c to
867f527
Compare
Lord-McSweeney
approved these changes
Dec 5, 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
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.
...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 tothe
_globalobject, but a naive implementation of that breaks other tests so I've left theexisting wrong behavior as-is.
EDIT: this is fixed