[Webkit-unassigned] [Bug 25902] Need to implement WorkerContext.close()

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri May 22 23:37:04 PDT 2009


ap at webkit.org changed:

           What    |Removed                     |Added
  Attachment #30590|review+                     |review-
               Flag|                            |

------- Comment #3 from ap at webkit.org  2009-05-22 23:37 PDT -------
(From update of attachment 30590)
Looks like this has a race condition in the following situation:
1) Worker thread decides to close itself, calling stop(), and subsequently
destroying WorkerContext object, notifying the proxy, and exiting the thread
2) At the same time, a message is sent from the main thread to the worker
thread. Since it takes time to deliver a workerContextDestroyed notification,
this message will be added to deleted WorkerContext's queue.

I think that the right way to implement close() is send a custom message to the
proxy, asking it to terminate the context in response, and to wait for this in
some "death row" state that prevents any other communication with the proxy.

Please add a test for this situation (if at all possible, one that would crash
with this patch). Please also add a test for a situation where the worker
decides to close itself from an XHR onreadystatechange callback, not in
response to a message from the main thread. It would be nice to verify that
this doesn't introduce leaks.

Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

More information about the webkit-unassigned mailing list