Skip to content

Commit b570030

Browse files
authored
Remove pthread alert polyfill (#23882)
I'm not sure why we were polyfilling this web API in all our workers. We don't generally do this for other APIs.
1 parent f718483 commit b570030

File tree

4 files changed

+2
-9
lines changed

4 files changed

+2
-9
lines changed

src/lib/libpthread.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,8 +290,6 @@ var LibraryPThread = {
290290
}
291291
#endif
292292
onFinishedLoading(worker);
293-
} else if (cmd === 'alert') {
294-
alert(`Thread ${d.threadId}: ${d.text}`);
295293
} else if (d.target === 'setimmediate') {
296294
// Worker wants to postMessage() to itself to implement setImmediate()
297295
// emulation.

src/runtime_pthread.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,6 @@ if (ENVIRONMENT_IS_PTHREAD) {
6464
if (!Module['printErr'])
6565
#endif
6666
err = threadPrintErr;
67-
function threadAlert(...args) {
68-
var text = args.join(' ');
69-
postMessage({cmd: 'alert', text, threadId: _pthread_self()});
70-
}
71-
self.alert = threadAlert;
7267

7368
// Turn unhandled rejected promises into errors so that the main thread will be
7469
// notified about them.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4108
1+
4054
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
8550
1+
8420

0 commit comments

Comments
 (0)