[Webkit-unassigned] [Bug 158004] Modern IDB: TransactionOperations from a worker thread might be destroyed on main thread

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon May 23 17:41:13 PDT 2016


https://bugs.webkit.org/show_bug.cgi?id=158004

--- Comment #1 from Brady Eidson <beidson at apple.com> ---
We definitely need to destroy these things on the worker thread. Tragic things might happen if we don't.

Each WorkerThread has a WorkerRunLoop, which handles ScriptExecutionContext::Tasks nonstop, and a WTF::RunLoop, which is normal 100% tied up running the WorkerRunLoop.

There's a few inherent races on the main thread here.

The main thread can check if the ScriptExecutionContext still exists and, if so, post a task to it. Problem is that by the time it posts the task, the ScriptExecutionContext might have been terminated (in a normal bad case) or even destroyed (in a tragic bad case)

Assuming that problem is solved, and we reliably check if the ScriptExecutionContext is still there, discover it's not, and then decide to post to the WorkerThread's WTF::RunLoop, there's no guarantee the RunLoop is still running and accepting tasks.

Some re-architecting will be necessary here.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160524/2d36b0f4/attachment-0001.html>


More information about the webkit-unassigned mailing list