Uh oh!
There was an error while loading. Please reload this page.
gh-128627: Fix iPad detection in wasm-gc - #135388
Conversation
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
hoodmane
commented
Jun 11, 2025
While we're at it maybe let's add links to the relevant webkit issue and the fix: |
hoodmane
commented
Jun 11, 2025
Otherwise looks good to me. Thanks @ryanking13! |
hoodmane
commented
Jun 11, 2025
Maybe we should also add a comment saying this code is only needed to make jspi work and since jspi is not yet supported on Safari it would be okay to turn it off for desktop Safari as well if we need to. |
| // Starting with iPadOS 13, iPads might send a platform string that looks like a desktop Mac. | ||
| // To differentiate, we check if the platform is 'MacIntel' (common for Macs and newer iPads) | ||
| // AND if the device has multi-touch capabilities (navigator.maxTouchPoints > 1) | ||
| (navigator.platform === 'MacIntel' && typeof navigator.maxTouchPoints !== 'undefined' && navigator.maxTouchPoints > 1) |
There was a problem hiding this comment.
duplicated same-comment here: pyodide/pyodide#5695 (review)
freakboy3742
left a comment
There was a problem hiding this comment.
Added in a reference to the radar and CPython issues, but otherwise, LGTM.
Uh oh!
There was an error while loading. Please reload this page.
Thanks @ryanking13 for the PR, and @freakboy3742 for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14. |
On some iPad versions, Safari reports as "macOS". Modifies the GC trampoline detection to add a feature-based check to detect this case. (cherry picked from commit d447129) Co-authored-by: Gyeongjae Choi <def6488@gmail.com>
GH-135419 is a backport of this pull request to the 3.14 branch. |
bedevere-bot
commented
Jun 12, 2025
|
freakboy3742
commented
Jun 12, 2025
Buildbot failure is a false positive. |
On some iPad versions, Safari reports as "macOS". Modifies the GC trampoline detection to add a feature-based check to detect this case.
On some iPad versions, Safari reports as "macOS". Modifies the GC trampoline detection to add a feature-based check to detect this case.
On some iPad versions, Safari reports as "macOS". Modifies the GC trampoline detection to add a feature-based check to detect this case.
On some iPad versions, Safari reports as "macOS". Modifies the GC trampoline detection to add a feature-based check to detect this case.
As of iOS / iPadOS 18.3.1, enabling wasm-gc is making the interpreter fail to load.
This issue was handled by @ambv in #130418, but that fix had an issue with not detecting the iPad correctly.
In iPad + Safari, iPad behaves like a Mac and checking
iPadstring innavigator.platformfails to detect iPad.Confirmed on device + downstream PR (pyodide/pyodide#5695)
cc: @hoodmane@WebReflection