Skip to content

Commit b7075a0

Browse files
committed
.
1 parent a3a7a12 commit b7075a0

4 files changed

Lines changed: 9 additions & 9 deletions

File tree

src/jsifier.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,7 @@ function(${args}) {
497497
proxyMode = PROXY_SYNC;
498498
}
499499
}
500-
const rtnType = sig && sig.length ? sig[0] : null;
500+
const rtnType = sig?.[0];
501501
const proxyFunc =
502502
MEMORY64 && rtnType == 'p' ? 'proxyToMainThreadPtr' : 'proxyToMainThread';
503503
deps.push('$' + proxyFunc);
@@ -698,7 +698,7 @@ function(${args}) {
698698
// signatures are relevant and they differ between and alais and
699699
// it's target) we need to construct a forwarding function from
700700
// one to the other.
701-
const isSigRelevant = MAIN_MODULE || MEMORY64 || CAN_ADDRESS_2GB || (sig && sig.includes('j'));
701+
const isSigRelevant = MAIN_MODULE || MEMORY64 || CAN_ADDRESS_2GB || sig?.includes('j');
702702
const targetSig = LibraryManager.library[aliasTarget + '__sig'];
703703
if (isSigRelevant && sig && targetSig && sig != targetSig) {
704704
debugLog(`${symbol}: Alias target (${aliasTarget}) has different signature (${sig} vs ${targetSig})`)

src/lib/libcore.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1377,7 +1377,7 @@ addToLibrary({
13771377
// (https://github.com/WebAudio/web-audio-api/issues/2527), so if building
13781378
// with
13791379
// Audio Worklets enabled, do a dynamic check for its presence.
1380-
if (globalThis.performance && performance.now) {
1380+
if (globalThis.performance?.now) {
13811381
#if PTHREADS
13821382
_emscripten_get_now = () => performance.timeOrigin + performance.now();
13831383
#else

src/lib/libsockfs.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -388,8 +388,8 @@ addToLibrary({
388388

389389
if (sock.recv_queue.length ||
390390
!dest || // connection-less sockets are always ready to read
391-
(dest && dest.socket.readyState === dest.socket.CLOSING) ||
392-
(dest && dest.socket.readyState === dest.socket.CLOSED)) { // let recv return 0 once closed
391+
dest?.socket.readyState === dest.socket.CLOSING ||
392+
dest?.socket.readyState === dest.socket.CLOSED) { // let recv return 0 once closed
393393
mask |= ({{{ cDefs.POLLRDNORM }}} | {{{ cDefs.POLLIN }}});
394394
}
395395

@@ -398,8 +398,8 @@ addToLibrary({
398398
mask |= {{{ cDefs.POLLOUT }}};
399399
}
400400

401-
if ((dest && dest.socket.readyState === dest.socket.CLOSING) ||
402-
(dest && dest.socket.readyState === dest.socket.CLOSED)) {
401+
if (dest?.socket.readyState === dest.socket.CLOSING ||
402+
dest?.socket.readyState === dest.socket.CLOSED) {
403403
// When an non-blocking connect fails mark the socket as writable.
404404
// Its up to the calling code to then use getsockopt with SO_ERROR to
405405
// retrieve the error.

test/codesize/test_codesize_hello_dylink_all.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"a.out.js": 244603,
2+
"a.out.js": 244577,
33
"a.out.nodebug.wasm": 578054,
4-
"total": 822657,
4+
"total": 822631,
55
"sent": [
66
"IMG_Init",
77
"IMG_Load",

0 commit comments

Comments
 (0)