ladybird icon indicating copy to clipboard operation
ladybird copied to clipboard

LibWeb: Don't discard PostedMessage tasks when closing a worker

Open tcl3 opened this issue 4 months ago • 0 comments

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().

Fixes:

  • https://wpt.live/workers/interfaces/WorkerGlobalScope/close/sending-messages.html
  • https://wpt.live/workers/WorkerPerformanceNow.html

tcl3 avatar Oct 07 '24 08:10 tcl3