mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-19 08:51:57 +00:00
LibWeb: Don't discard PostedMessage tasks when closing a worker
The spec expects `postMessage()` to act as if it is invoked immediately. Since `postMessage()` isn't actually invoked immediately, keep tasks with source `PostedMessage` in the task queue, so that these tasks are processed. Fixes a hang when `WorkerGlobalScope.close()` is called immediately after `postMessage()`.
This commit is contained in:
parent
d30ae92b82
commit
fd8d350b47
Notes:
github-actions[bot]
2024-10-08 04:52:03 +00:00
Author: https://github.com/tcl3
Commit: fd8d350b47
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1661
Reviewed-by: https://github.com/shannonbooth
5 changed files with 21 additions and 2 deletions
|
@ -0,0 +1,4 @@
|
|||
self.onmessage = function () {
|
||||
postMessage("PASS (didn't hang)");
|
||||
self.close();
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue