Skip to content

Commit 9df5170

Browse files
committed
review
1 parent 4fdfd6e commit 9df5170

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/lib/libatomic.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ addToLibrary({
2222
// https://github.com/tc39/proposal-atomics-wait-async/blob/master/PROPOSAL.md
2323
// This polyfill performs polling with setTimeout() to observe a change in the
2424
// target memory location.
25-
$waitAsyncPolyfilled: `Atomics.waitAsyncPolyfilled = (!Atomics.waitAsync || (globalThis.navigator?.userAgent && Number((navigator.userAgent.match(/Chrom(e|ium)\\/([0-9]+)\\./)||[])[2]) < 91));`,
25+
$waitAsyncPolyfilled: '=(!Atomics.waitAsync || (globalThis.navigator?.userAgent && Number((navigator.userAgent.match(/Chrom(e|ium)\\/([0-9]+)\\./)||[])[2]) < 91));',
2626
$polyfillWaitAsync__deps: ['$waitAsyncPolyfilled'],
27-
$polyfillWaitAsync__postset: `if (Atomics.waitAsyncPolyfilled) {
27+
$polyfillWaitAsync__postset: `if (waitAsyncPolyfilled) {
2828
let __Atomics_waitAsyncAddresses = [/*[i32a, index, value, maxWaitMilliseconds, promiseResolve]*/];
2929
function __Atomics_pollWaitAsyncAddresses() {
3030
let now = performance.now();

src/lib/libpthread.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1263,7 +1263,7 @@ var LibraryPThread = {
12631263

12641264
_emscripten_thread_mailbox_await__deps: ['$checkMailbox', '$waitAsyncPolyfilled'],
12651265
_emscripten_thread_mailbox_await: (pthread_ptr) => {
1266-
if (!Atomics.waitAsyncPolyfilled) {
1266+
if (!waitAsyncPolyfilled) {
12671267
// Wait on the pthread's initial self-pointer field because it is easy and
12681268
// safe to access from sending threads that need to notify the waiting
12691269
// thread.

0 commit comments

Comments
 (0)