Skip to content

Commit 78c968b

Browse files
authored
Bump minimum supported chrome version from 32 to 33 (#23077)
This allows us to remove the promise polyfill: https://caniuse.com/promises
1 parent a335879 commit 78c968b

File tree

7 files changed

+5
-309
lines changed

7 files changed

+5
-309
lines changed

ChangeLog.md

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ See docs/process.md for more on how version tagging works.
2222
-----------------------
2323
- The file system was updated to independently track atime, mtime and ctime
2424
instead of using the same time for all three. (#22998)
25+
- The minimum supported chrome version was bumped from 32 to 33. (#23077)
2526

2627
3.1.73 - 11/28/24
2728
-----------------

site/source/docs/tools_reference/settings_reference.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -2939,7 +2939,7 @@ This setting also applies to modern Chromium-based Edge, which shares version
29392939
numbers with Chrome.
29402940
Chrome 85 was released on 2020-08-25.
29412941
MAX_INT (0x7FFFFFFF, or -1) specifies that target is not supported.
2942-
Minimum supported value is 32, which was released on 2014-01-04.
2942+
Minimum supported value is 33, which was released on 2014-02-18.
29432943

29442944
Default value: 85
29452945

src/polyfill/promise.js

-274
This file was deleted.

src/settings.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1919,7 +1919,7 @@ var MIN_SAFARI_VERSION = 140100;
19191919
// numbers with Chrome.
19201920
// Chrome 85 was released on 2020-08-25.
19211921
// MAX_INT (0x7FFFFFFF, or -1) specifies that target is not supported.
1922-
// Minimum supported value is 32, which was released on 2014-01-04.
1922+
// Minimum supported value is 33, which was released on 2014-02-18.
19231923
// [link]
19241924
var MIN_CHROME_VERSION = 85;
19251925

src/shell.js

-8
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,6 @@ var Module = typeof {{{ EXPORT_NAME }}} != 'undefined' ? {{{ EXPORT_NAME }}} : {
3434
#endif // USE_CLOSURE_COMPILER
3535

3636
#if POLYFILL
37-
#if ((MAYBE_WASM2JS && WASM != 2) || MODULARIZE) && (MIN_CHROME_VERSION < 33 || MIN_FIREFOX_VERSION < 29 || MIN_SAFARI_VERSION < 80000)
38-
// Include a Promise polyfill for legacy browsers. This is needed either for
39-
// wasm2js, where we polyfill the wasm API which needs Promises, or when using
40-
// modularize which creates a Promise for when the module is ready.
41-
// See https://caniuse.com/#feat=promises
42-
#include "polyfill/promise.js"
43-
#endif
44-
4537
#if MIN_CHROME_VERSION < 45 || MIN_FIREFOX_VERSION < 34 || MIN_SAFARI_VERSION < 90000
4638
// See https://caniuse.com/mdn-javascript_builtins_object_assign
4739
#include "polyfill/objassign.js"

test/test_other.py

+1-24
Original file line numberDiff line numberDiff line change
@@ -12427,29 +12427,6 @@ def test_standalone_syscalls(self):
1242712427
for engine in config.WASM_ENGINES:
1242812428
self.assertContained(expected, self.run_js('test.wasm', engine))
1242912429

12430-
@parameterized({
12431-
'wasm2js': (['-sWASM=0'],),
12432-
'modularize': (['-sMODULARIZE', '--extern-post-js', test_file('modularize_post_js.js')],),
12433-
})
12434-
def test_promise_polyfill(self, constant_args):
12435-
def test(args, expect_fail):
12436-
# legacy browsers may lack Promise, which wasm2js depends on. see what
12437-
# happens when we kill the global Promise function.
12438-
self.run_process([EMCC, test_file('hello_world.c')] + constant_args + args)
12439-
js = read_file('a.out.js')
12440-
create_file('a.out.js', 'Promise = undefined;\n' + js)
12441-
return self.run_js('a.out.js', assert_returncode=NON_ZERO if expect_fail else 0)
12442-
12443-
# we fail without legacy support
12444-
test([], expect_fail=True)
12445-
12446-
# but work with it
12447-
output = test(['-sLEGACY_VM_SUPPORT'], expect_fail=False)
12448-
self.assertContained('hello, world!', output)
12449-
12450-
# unless we explicitly disable polyfills
12451-
test(['-sLEGACY_VM_SUPPORT', '-sNO_POLYFILL'], expect_fail=True)
12452-
1245312430
@parameterized({
1245412431
'': ([],),
1245512432
'assertions': (['-sASSERTIONS'],),
@@ -15265,7 +15242,7 @@ def test_no_extra_output(self):
1526515242

1526615243
def test_browser_too_old(self):
1526715244
err = self.expect_fail([EMCC, test_file('hello_world.c'), '-sMIN_CHROME_VERSION=10'])
15268-
self.assertContained('emcc: error: MIN_CHROME_VERSION older than 32 is not supported', err)
15245+
self.assertContained('emcc: error: MIN_CHROME_VERSION older than 33 is not supported', err)
1526915246

1527015247
def test_js_only_settings(self):
1527115248
err = self.run_process([EMCC, test_file('hello_world.c'), '-o', 'foo.wasm', '-sDEFAULT_LIBRARY_FUNCS_TO_INCLUDE=emscripten_get_heap_max'], stderr=PIPE).stderr

tools/feature_matrix.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
# Oldest support browser versions. These have been set somewhat
1919
# arbitrarily for now.
2020
# TODO(sbc): Design a of policy for managing these values.
21-
OLDEST_SUPPORTED_CHROME = 32
21+
OLDEST_SUPPORTED_CHROME = 33
2222
OLDEST_SUPPORTED_FIREFOX = 34
2323
OLDEST_SUPPORTED_SAFARI = 90000
2424
# 10.19.0 is the oldest version of node that we do any testing with.

0 commit comments

Comments
 (0)