There was an error while loading. Please reload this page.
1 parent 71f5faf commit d447129Copy full SHA for d447129
1 file changed
Python/emscripten_trampoline.c
@@ -71,7 +71,16 @@ EM_JS(CountArgsFunc, _PyEM_GetCountArgsPtr, (), {
71
// )
72
73
function getPyEMCountArgsPtr() {
74
- let isIOS = globalThis.navigator && /iPad|iPhone|iPod/.test(navigator.platform);
+ // Starting with iOS 18.3.1, WebKit on iOS has an issue with the garbage
75
+ // collector that breaks the call trampoline. See #130418 and
76
+ // https://bugs.webkit.org/show_bug.cgi?id=293113 for details.
77
+ let isIOS = globalThis.navigator && (
78
+ /iPad|iPhone|iPod/.test(navigator.userAgent) ||
79
+ // Starting with iPadOS 13, iPads might send a platform string that looks like a desktop Mac.
80
+ // To differentiate, we check if the platform is 'MacIntel' (common for Macs and newer iPads)
81
+ // AND if the device has multi-touch capabilities (navigator.maxTouchPoints > 1)
82
+ (navigator.platform === 'MacIntel' && typeof navigator.maxTouchPoints !== 'undefined' && navigator.maxTouchPoints > 1)
83
+ )
84
if (isIOS) {
85
return 0;
86
}
0 commit comments