<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Modern IDB: TransactionOperations from a worker thread might be destroyed on main thread"
href="https://bugs.webkit.org/show_bug.cgi?id=158004#c3">Comment # 3</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Modern IDB: TransactionOperations from a worker thread might be destroyed on main thread"
href="https://bugs.webkit.org/show_bug.cgi?id=158004">bug 158004</a>
from <span class="vcard"><a class="email" href="mailto:beidson@apple.com" title="Brady Eidson <beidson@apple.com>"> <span class="fn">Brady Eidson</span></a>
</span></b>
<pre>(In reply to <a href="show_bug.cgi?id=158004#c2">comment #2</a>)
<span class="quote">> One idea for part of this:
>
> All of the IDB ActiveDOMObjects guard their own "postTask" which has a guard
> lock around the scriptExecutionContext(). They also use that lock inside
> their "contextDestroyed()" observer.
>
> That will definitely solve the first big problem - the race with the
> scriptExecutionContext itself existing and being active.
>
> Then we just need to solve "the thread runloop itself may no longer be
> active enough to use."</span >
And the moment I woke up this morning, the super obvious answer hit me: When the thread shuts down, it cancels all currently registered operations, which will cause them to get destroyed on the appropriate thread before said thread goes away.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>