Skip to content

Commit 605de63

Browse files
Merge branch 'main' into main
2 parents e73f895 + 225f3d5 commit 605de63

6 files changed

Lines changed: 17 additions & 13 deletions

File tree

ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ See docs/process.md for more on how version tagging works.
3434
- ASYNCIFY/JSPI functions in JS library files can now be marked as `__async:
3535
'auto'`, which allows async JS function to be used unmodified with
3636
ASYNCIFY/JSPI. (#26130, #26019)
37+
- SDL3 port updated to 3.2.30. (#25273)
3738

3839
4.0.23 - 01/10/26
3940
-----------------

src/parseTools.mjs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1127,10 +1127,13 @@ function ENVIRONMENT_IS_WORKER_THREAD() {
11271127
}
11281128

11291129
function nodeDetectionCode() {
1130-
if (ENVIRONMENT == 'node') {
1130+
if (ENVIRONMENT == 'node' && !ASSERTIONS) {
11311131
// The only environment where this code is intended to run is Node.js.
11321132
// Return unconditional true so that later Closure optimizer will be able to
11331133
// optimize code size.
1134+
//
1135+
// Note: we don't do this in debug builds because we have have assertions
1136+
// that want to be able to check if we really are running on node or not.
11341137
return 'true';
11351138
}
11361139
return "globalThis.process?.versions?.node && globalThis.process?.type != 'renderer'";

src/shell.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ if (ENVIRONMENT_IS_AUDIO_WORKLET) ENVIRONMENT_IS_WASM_WORKER = true;
6565
// Determine the runtime environment we are in. You can customize this by
6666
// setting the ENVIRONMENT setting at compile time (see settings.js).
6767

68-
#if ENVIRONMENT.length == 1
68+
#if ENVIRONMENT.length == 1 && !ASSERTIONS
6969
var ENVIRONMENT_IS_WEB = {{{ ENVIRONMENT[0] === 'web' }}};
7070
#if PTHREADS && ENVIRONMENT_MAY_BE_NODE
7171
// node+pthreads always supports workers; detect which we are at runtime
@@ -75,7 +75,7 @@ var ENVIRONMENT_IS_WORKER = {{{ ENVIRONMENT[0] === 'worker' }}};
7575
#endif
7676
var ENVIRONMENT_IS_NODE = {{{ ENVIRONMENT[0] === 'node' }}};
7777
var ENVIRONMENT_IS_SHELL = {{{ ENVIRONMENT[0] === 'shell' }}};
78-
#else // ENVIRONMENT
78+
#else // ENVIRONMENT.length == 1
7979
// Attempt to auto-detect the environment
8080
var ENVIRONMENT_IS_WEB = !!globalThis.window;
8181
var ENVIRONMENT_IS_WORKER = !!globalThis.WorkerGlobalScope;

test/common.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -447,9 +447,9 @@ def require_node_canary(self):
447447

448448
self.fail('node canary required to run this test. Use EMTEST_SKIP_NODE_CANARY to skip')
449449

450-
def require_engine(self, engine):
450+
def require_engine(self, engine, force=False):
451451
logger.debug(f'require_engine: {engine}')
452-
if self.required_engine and self.required_engine != engine:
452+
if not force and self.required_engine and self.required_engine != engine:
453453
self.skipTest(f'Skipping test that requires `{engine}` when `{self.required_engine}` was previously required')
454454
self.required_engine = engine
455455
self.js_engines = [engine]

test/test_core.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8675,10 +8675,10 @@ def test(assert_returncode=0):
86758675
js = read_file(self.output_name('test_hello_world'))
86768676
assert ('require(' in js) == ('node' in self.get_setting('ENVIRONMENT')), 'we should have require() calls only if node js specified'
86778677

8678-
for engine in config.JS_ENGINES:
8678+
for engine in self.js_engines:
86798679
print(f'engine: {engine}')
86808680
# set us to test in just this engine
8681-
self.require_engine(engine)
8681+
self.require_engine(engine, force=True)
86828682
# tell the compiler to build with just that engine
86838683
if engine_is_node(engine):
86848684
right = 'node'
@@ -8688,19 +8688,19 @@ def test(assert_returncode=0):
86888688
wrong = 'node'
86898689
# test with the right env
86908690
self.set_setting('ENVIRONMENT', right)
8691-
print('ENVIRONMENT =', self.get_setting('ENVIRONMENT'))
8691+
print('right ENVIRONMENT =', self.get_setting('ENVIRONMENT'))
86928692
test()
86938693
# test with the wrong env
86948694
self.set_setting('ENVIRONMENT', wrong)
8695-
print('ENVIRONMENT =', self.get_setting('ENVIRONMENT'))
8695+
print('wrong ENVIRONMENT =', self.get_setting('ENVIRONMENT'))
86968696
try:
86978697
test(assert_returncode=NON_ZERO)
86988698
raise Exception('unexpected success')
86998699
except Exception as e:
8700-
self.assertContained('not compiled for this environment', str(e))
8700+
self.assertContained(['environment detected but not enabled at build time', 'not compiled for this environment'], str(e))
87018701
# test with a combined env
87028702
self.set_setting('ENVIRONMENT', right + ',' + wrong)
8703-
print('ENVIRONMENT =', self.get_setting('ENVIRONMENT'))
8703+
print('both ENVIRONMENT =', self.get_setting('ENVIRONMENT'))
87048704
test()
87058705

87068706
@requires_node

tools/ports/sdl3.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99

1010
from tools import diagnostics
1111

12-
VERSION = '3.2.22'
12+
VERSION = '3.2.30'
1313
TAG = f'release-{VERSION}'
14-
HASH = '2d49f43f37b681b3b12918518fc2bb89fd79f64b6f9592cceb504402a9cfb3d5c0ae6f437cdbcd8fdef11065dfb15a86fcb61a58cf1fa41af71a61f767ab7260'
14+
HASH = '80ef7b2f257f43fe47c7ea8aa0a64f1c6f23720d91065d5e9b42f0205c62fc98bcf8dd1f1834fe09c66bea2598a18a658b82212cb29810be2d2175dece0aadce'
1515
SUBDIR = f'SDL-{TAG}'
1616

1717
variants = {'sdl3-mt': {'PTHREADS': 1}}

0 commit comments

Comments
 (0)