Skip to content

Commit c923f61

Browse files
committed
Remove/fix usage of MIN_SAFARI_VERSION
We don't support targeting safari version older than 10.10.00 so two of these conditions were always true. The third check was added in emscripten-core#21428 and looks to me like it was always wrong. The window.orientation API was added in safari 16.4 as the comment says so I updated the check to match. I'm not sure where the old value of 0x100400 came from or what it means.
1 parent be531bd commit c923f61

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

src/lib/libemval.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ var LibraryEmVal = {
303303
return id;
304304
},
305305
306-
#if MIN_CHROME_VERSION < 49 || MIN_FIREFOX_VERSION < 42 || MIN_SAFARI_VERSION < 100101
306+
#if MIN_CHROME_VERSION < 49 || MIN_FIREFOX_VERSION < 42
307307
$reflectConstruct: null,
308308
$reflectConstruct__postset: `
309309
if (typeof Reflect != 'undefined') {

src/lib/libhtml5.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -901,7 +901,7 @@ var LibraryHTML5 = {
901901
}
902902
orientationAngle = screenOrientObj.angle;
903903
}
904-
#if MIN_SAFARI_VERSION < 0x100400
904+
#if MIN_SAFARI_VERSION < 164000
905905
else {
906906
// fallback for Safari earlier than 16.4 (March 2023)
907907
orientationAngle = window.orientation;

tools/link.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1264,10 +1264,9 @@ def limit_incoming_module_api():
12641264
settings.MIN_SAFARI_VERSION < 140000 or
12651265
settings.MIN_NODE_VERSION < 160000)
12661266

1267-
# https://caniuse.com/class: FF:45 CHROME:49 SAFARI:9
1267+
# https://caniuse.com/class: FF:45 CHROME:49
12681268
supports_es6_classes = (settings.MIN_FIREFOX_VERSION >= 45 and
1269-
settings.MIN_CHROME_VERSION >= 49 and
1270-
settings.MIN_SAFARI_VERSION >= 90000)
1269+
settings.MIN_CHROME_VERSION >= 49)
12711270

12721271
if not settings.DISABLE_EXCEPTION_CATCHING and settings.EXCEPTION_STACK_TRACES and not supports_es6_classes:
12731272
diagnostics.warning('transpile', '-sEXCEPTION_STACK_TRACES requires an engine that support ES6 classes.')

0 commit comments

Comments
 (0)