Skip to content

Commit 4fdfd6e

Browse files
committed
Add dependency
1 parent e47e528 commit 4fdfd6e

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/lib/libatomic.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +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-
$polyfillWaitAsync__postset: `Atomics.waitAsyncPolyfilled = (!Atomics.waitAsync || (globalThis.navigator?.userAgent && Number((navigator.userAgent.match(/Chrom(e|ium)\\/([0-9]+)\\./)||[])[2]) < 91));
26-
if (Atomics.waitAsyncPolyfilled) {
25+
$waitAsyncPolyfilled: `Atomics.waitAsyncPolyfilled = (!Atomics.waitAsync || (globalThis.navigator?.userAgent && Number((navigator.userAgent.match(/Chrom(e|ium)\\/([0-9]+)\\./)||[])[2]) < 91));`,
26+
$polyfillWaitAsync__deps: ['$waitAsyncPolyfilled'],
27+
$polyfillWaitAsync__postset: `if (Atomics.waitAsyncPolyfilled) {
2728
let __Atomics_waitAsyncAddresses = [/*[i32a, index, value, maxWaitMilliseconds, promiseResolve]*/];
2829
function __Atomics_pollWaitAsyncAddresses() {
2930
let now = performance.now();

src/lib/libpthread.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1261,7 +1261,7 @@ var LibraryPThread = {
12611261
}
12621262
}),
12631263

1264-
_emscripten_thread_mailbox_await__deps: ['$checkMailbox'],
1264+
_emscripten_thread_mailbox_await__deps: ['$checkMailbox', '$waitAsyncPolyfilled'],
12651265
_emscripten_thread_mailbox_await: (pthread_ptr) => {
12661266
if (!Atomics.waitAsyncPolyfilled) {
12671267
// Wait on the pthread's initial self-pointer field because it is easy and

0 commit comments

Comments
 (0)