diff --git a/src/lib/liblittle_endian_heap.js b/src/lib/liblittle_endian_heap.js index 1f97eb6530010..8a2ba67c8af2a 100644 --- a/src/lib/liblittle_endian_heap.js +++ b/src/lib/liblittle_endian_heap.js @@ -109,11 +109,11 @@ function LE_HEAP_UPDATE() { const res = order(Atomics.sub(heap, offset, order(value))); return heap.unsigned ? heap.unsigned(res) : res; }, - $LE_ATOMICS_WAIT: (heap, offset, value, timeout) => { + $LE_ATOMICS_WAIT: (heap, offset, value, timeout = Infinity) => { const order = LE_ATOMICS_NATIVE_BYTE_ORDER[heap.BYTES_PER_ELEMENT - 1]; return Atomics.wait(heap, offset, order(value), timeout); }, - $LE_ATOMICS_WAITASYNC: (heap, offset, value, timeout) => { + $LE_ATOMICS_WAITASYNC: (heap, offset, value, timeout = Infinity) => { const order = LE_ATOMICS_NATIVE_BYTE_ORDER[heap.BYTES_PER_ELEMENT - 1]; return Atomics.waitAsync(heap, offset, order(value), timeout); }, diff --git a/tools/acorn-optimizer.mjs b/tools/acorn-optimizer.mjs index fdc2306649a26..11a9d2c401ce1 100755 --- a/tools/acorn-optimizer.mjs +++ b/tools/acorn-optimizer.mjs @@ -1219,9 +1219,10 @@ function isGrowHEAPAccess(node) { if ( node.type !== 'MemberExpression' || !node.computed || // notice a[X] but not a.X - node.object.type !== 'ParenthesizedExpression') + (node.object.type !== 'ParenthesizedExpression' && node.object.type !== 'SequenceExpression') + ) return false; - const obj = node.object.expression; + const obj = node.object.type === 'ParenthesizedExpression' ? node.object.expression : node.object; return ( obj.type === 'SequenceExpression' && obj.expressions.length === 2 &&