PPAPI: Never re-enter JavaScript for PostMessage.
commit6b328f3db4b55fa299b6cfac9a30efbc47a2ad26
authordmichael <dmichael@chromium.org>
Mon, 29 Sep 2014 23:49:02 +0000 (29 16:49 -0700)
committerCommit bot <commit-bot@chromium.org>
Mon, 29 Sep 2014 23:50:28 +0000 (29 23:50 +0000)
treeb6f2b1e1f3d8adc9badd7ee83b85a0915b305087
parentb92e6f5c2a5271850a39afa1254d41ccc34ec5e6
PPAPI: Never re-enter JavaScript for PostMessage.

Blocking renderer->plugin messages can be interrupted by any message
from the plugin->renderer (even async ones). So while handline a blocking
message, such as HandleInputEvent or HandleBlockingMessage, it's currently
possible to re-enter JavaScript. This patch makes that impossible by
queueing up Plugin->Renderer messages sent via PPB_Messaging::PostMessage
while any renderer->plugin sync message is on the stack.

BUG=384528

Committed: https://crrev.com/f73075c99b5ba30e8d62dc5f13fdfb210d0fc506
Cr-Commit-Position: refs/heads/master@{#296311}

Committed: https://crrev.com/3fe4ceee750b2cd130bd402de3d371d8518c3eba
Cr-Commit-Position: refs/heads/master@{#296807}

Review URL: https://codereview.chromium.org/589213003

Cr-Commit-Position: refs/heads/master@{#297308}
12 files changed:
content/renderer/pepper/host_dispatcher_wrapper.cc
content/renderer/pepper/host_dispatcher_wrapper.h
content/renderer/pepper/message_channel.cc
content/renderer/pepper/message_channel.h
content/renderer/pepper/pepper_hung_plugin_filter.h
ppapi/proxy/dispatcher.cc
ppapi/proxy/dispatcher.h
ppapi/proxy/host_dispatcher.cc
ppapi/proxy/host_dispatcher.h
ppapi/proxy/ppapi_proxy_test.cc
ppapi/proxy/ppapi_proxy_test.h
ppapi/tests/test_message_handler.cc