On Tue, Apr 7, 2009 at 5:04 AM, Michael Nordman <span dir="ltr"><<a href="mailto:michaeln@google.com">michaeln@google.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Consider three threads<div><br></div><div>PageA</div><div>PageB</div><div>PluginC</div><div><br></div><div>PageA</div><div>-grabs storage lock</div><div><br></div><div>PluginC</div><div>-calls out to PageB (everything in NPAPI is synchronous)</div>

<div>-now waiting for PageB to return</div><div><br></div><div>PageB</div><div>-while handling the plugins callback, attempts to grab the storage lock</div><div>-BLOCKED waiting for PageA to release it</div><div><br></div>

<div>PageA</div><div>-calls plugin (sync method call)</div><div>-BLOCK waiting indirectly for PageB</div><div><br></div><div>== DEADLOCK</div></blockquote><div> </div></div>What happens if we don't have storage locks but PageB does a sync XHR or alert() inside the callout from the plugin? All the other pages containing plugins of that type lock up?<br clear="all">
<br>Rob<br>-- <br>"He was pierced for our transgressions, he was crushed for our iniquities; the punishment that brought us peace was upon him, and by his wounds we are healed. We all, like sheep, have gone astray, each of us has turned to his own way; and the LORD has laid on him the iniquity of us all." [Isaiah 53:5-6]<br>