Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(387)

Issue 589213003: PPAPI: Never re-enter JavaScript for PostMessage. (Closed)

Created:
6 years, 3 months ago by dmichael (off chromium)
Modified:
6 years, 2 months ago
Reviewers:
raymes
CC:
chromium-reviews, mkwst+moarreviews-renderer_chromium.org, darin-cc_chromium.org, jam
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

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} Committed: https://crrev.com/6b328f3db4b55fa299b6cfac9a30efbc47a2ad26 Cr-Commit-Position: refs/heads/master@{#297308}

Patch Set 1 #

Patch Set 2 : cleanup/fixes #

Total comments: 14

Patch Set 3 : Cleanup, review comments #

Patch Set 4 : undo small formatting change #

Patch Set 5 : Fix crash, address raymes's comments I missed #

Patch Set 6 : Make MessageChannel observer clean up more reliably, guarantee HungPluginFilter stays alive long en… #

Unified diffs Side-by-side diffs Delta from patch set Stats (+167 lines, -71 lines) Patch
M content/renderer/pepper/host_dispatcher_wrapper.h View 1 2 3 4 5 3 chunks +6 lines, -1 line 0 comments Download
M content/renderer/pepper/host_dispatcher_wrapper.cc View 1 2 3 4 5 3 chunks +11 lines, -2 lines 0 comments Download
M content/renderer/pepper/message_channel.h View 1 2 3 4 5 6 chunks +39 lines, -8 lines 0 comments Download
M content/renderer/pepper/message_channel.cc View 1 2 3 4 5 7 chunks +61 lines, -20 lines 0 comments Download
M content/renderer/pepper/pepper_hung_plugin_filter.h View 1 chunk +3 lines, -2 lines 0 comments Download
M ppapi/proxy/dispatcher.h View 1 2 chunks +3 lines, -2 lines 0 comments Download
M ppapi/proxy/dispatcher.cc View 1 chunk +3 lines, -2 lines 0 comments Download
M ppapi/proxy/host_dispatcher.h View 1 2 3 4 5 7 chunks +19 lines, -6 lines 0 comments Download
M ppapi/proxy/host_dispatcher.cc View 1 2 3 4 5 4 chunks +19 lines, -7 lines 0 comments Download
M ppapi/proxy/ppapi_proxy_test.h View 1 chunk +0 lines, -4 lines 0 comments Download
M ppapi/proxy/ppapi_proxy_test.cc View 1 2 4 chunks +2 lines, -11 lines 0 comments Download
M ppapi/tests/test_message_handler.cc View 1 2 3 4 5 1 chunk +1 line, -6 lines 0 comments Download

Messages

Total messages: 24 (6 generated)
dmichael (off chromium)
Hi Raymes, Would you mind taking a look? There might be a couple of rough ...
6 years, 3 months ago (2014-09-22 23:10:04 UTC) #2
raymes
This looks like a nice fix. Thanks. Just a few small comments. I can land ...
6 years, 3 months ago (2014-09-23 02:57:10 UTC) #3
dmichael (off chromium)
Comments addressed. If you're happy with it, I'd appreciate setting the CQ bit. Thanks! https://codereview.chromium.org/589213003/diff/20001/content/renderer/pepper/host_dispatcher_wrapper.cc ...
6 years, 3 months ago (2014-09-23 17:38:42 UTC) #4
raymes
lgtm https://codereview.chromium.org/589213003/diff/20001/content/renderer/pepper/message_channel.cc File content/renderer/pepper/message_channel.cc (right): https://codereview.chromium.org/589213003/diff/20001/content/renderer/pepper/message_channel.cc#newcode169 content/renderer/pepper/message_channel.cc:169: // We can't drain the JS message queue ...
6 years, 3 months ago (2014-09-24 00:05:48 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/589213003/60001
6 years, 3 months ago (2014-09-24 00:07:09 UTC) #7
commit-bot: I haz the power
Committed patchset #4 (id:60001) as bade5b758e79c56bf54932261346a398aab47d61
6 years, 3 months ago (2014-09-24 00:12:09 UTC) #8
commit-bot: I haz the power
Patchset 4 (id:??) landed as https://crrev.com/f73075c99b5ba30e8d62dc5f13fdfb210d0fc506 Cr-Commit-Position: refs/heads/master@{#296311}
6 years, 3 months ago (2014-09-24 00:12:45 UTC) #9
dmichael (off chromium)
On 2014/09/24 00:05:48, raymes wrote: > lgtm > > https://codereview.chromium.org/589213003/diff/20001/content/renderer/pepper/message_channel.cc > File content/renderer/pepper/message_channel.cc (right): > ...
6 years, 3 months ago (2014-09-24 16:16:45 UTC) #10
bbudge
A revert of this CL (patchset #4 id:60001) has been created in https://codereview.chromium.org/601923003/ by bbudge@chromium.org. ...
6 years, 3 months ago (2014-09-24 23:41:40 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/589213003/80001
6 years, 2 months ago (2014-09-25 18:31:23 UTC) #13
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_rel_swarming on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_rel_swarming/builds/17969)
6 years, 2 months ago (2014-09-25 19:58:50 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/589213003/80001
6 years, 2 months ago (2014-09-25 20:01:02 UTC) #17
commit-bot: I haz the power
Committed patchset #5 (id:80001) as 6e7e8825a0ca7cc90d9be1ec07d0cdae718a086b
6 years, 2 months ago (2014-09-25 22:26:45 UTC) #18
commit-bot: I haz the power
Patchset 5 (id:??) landed as https://crrev.com/3fe4ceee750b2cd130bd402de3d371d8518c3eba Cr-Commit-Position: refs/heads/master@{#296807}
6 years, 2 months ago (2014-09-25 22:27:22 UTC) #19
dmichael (off chromium)
A revert of this CL (patchset #5 id:80001) has been created in https://codereview.chromium.org/605393002/ by dmichael@chromium.org. ...
6 years, 2 months ago (2014-09-26 21:08:17 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/589213003/100001
6 years, 2 months ago (2014-09-29 22:43:09 UTC) #22
commit-bot: I haz the power
Committed patchset #6 (id:100001) as 7037a558d6220a80ac1366359ba5958cdf906ed2
6 years, 2 months ago (2014-09-29 23:49:30 UTC) #23
commit-bot: I haz the power
6 years, 2 months ago (2014-09-29 23:51:06 UTC) #24
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/6b328f3db4b55fa299b6cfac9a30efbc47a2ad26
Cr-Commit-Position: refs/heads/master@{#297308}

Powered by Google App Engine
This is Rietveld 408576698