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

Issue 632113003: Pepper: Allow plugins to call PPB_UDP_Socket::SendTo multiple times. (Closed)

Created:
6 years, 2 months ago by bbudge
Modified:
5 years, 11 months ago
CC:
chromium-reviews, darin-cc_chromium.org, jam
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Pepper: Allow plugins to call PPB_UDP_Socket::SendTo multiple times. This changes the implementation to allow multiple SendTo calls to be in flight at the same time. The plugin can now call SendTo multiple times before getting PP_ERROR_INPROGRESS. The number of calls is an implementation detail. Plugins that want maximum performance should call SendTo continuously until they get an in progress result, then wait for one or more previous calls to complete before calling Send again. The resource is changed to queue SendTo callbacks. It checks that the plugin stays within the limit, which is currently 8. The browser message filter is changed to call SendTo until the socket is busy, then queue the sends. It checks that the plugin can't grow the queue past the limit. In theory, a plugin could go over the limit by bypassing the resource checks but not saturating the socket. This is not really a problem. Adds a test to send multiple messages in the "optional callbacks" case. BUG=154338 Committed: https://crrev.com/c76a0f987cf778d0cb14da86f132af9a0b200f72 Cr-Commit-Position: refs/heads/master@{#311563}

Patch Set 1 #

Patch Set 2 : Test multiple send, queue sends when socket_ is busy. #

Patch Set 3 : pop() pending sends after they're sent. #

Patch Set 4 : Add a separate test for parallel SendTo. #

Total comments: 18

Patch Set 5 : Review comments, document INPROGRESS error in IDL. #

Total comments: 8

Patch Set 6 : Streamline handling of pending sends. #

Total comments: 4

Patch Set 7 : Explicit loop to flush, don't flush if already waiting. #

Patch Set 8 : Eliminate recursion. #

Patch Set 9 : Rebase. #

Patch Set 10 : Fix rebase weirdness. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+184 lines, -43 lines) Patch
M chrome/test/ppapi/ppapi_browsertest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M content/browser/renderer_host/pepper/pepper_udp_socket_message_filter.h View 1 2 3 4 5 6 7 8 4 chunks +19 lines, -3 lines 0 comments Download
M content/browser/renderer_host/pepper/pepper_udp_socket_message_filter.cc View 1 2 3 4 5 6 7 8 9 chunks +64 lines, -31 lines 0 comments Download
M ppapi/api/ppb_udp_socket.idl View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -0 lines 0 comments Download
M ppapi/c/ppb_udp_socket.h View 1 2 3 4 5 6 7 8 9 2 chunks +4 lines, -1 line 0 comments Download
M ppapi/cpp/udp_socket.h View 1 2 3 4 1 chunk +3 lines, -0 lines 0 comments Download
M ppapi/proxy/udp_socket_resource_base.h View 1 2 3 4 5 6 7 8 3 chunks +5 lines, -1 line 0 comments Download
M ppapi/proxy/udp_socket_resource_base.cc View 1 2 3 4 5 6 7 8 4 chunks +13 lines, -6 lines 0 comments Download
M ppapi/tests/test_udp_socket.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M ppapi/tests/test_udp_socket.cc View 1 2 3 4 5 6 7 8 2 chunks +71 lines, -0 lines 0 comments Download

Messages

Total messages: 20 (2 generated)
bbudge
6 years, 2 months ago (2014-10-08 00:27:04 UTC) #2
dmichael (off chromium)
This looks great so far, thank you Bill! Broader issues: - Would it make sense ...
6 years, 2 months ago (2014-10-08 17:20:46 UTC) #3
yzshen1
It may be a little inconvenient that the plugin has to wait till it sees ...
6 years, 2 months ago (2014-10-08 17:50:24 UTC) #4
yzshen1
https://codereview.chromium.org/632113003/diff/60001/content/browser/renderer_host/pepper/pepper_udp_socket_message_filter.cc File content/browser/renderer_host/pepper/pepper_udp_socket_message_filter.cc (right): https://codereview.chromium.org/632113003/diff/60001/content/browser/renderer_host/pepper/pepper_udp_socket_message_filter.cc#newcode440 content/browser/renderer_host/pepper/pepper_udp_socket_message_filter.cc:440: scoped_refptr<net::IOBufferWithSize> buffer, Why do we need this? Is it ...
6 years, 2 months ago (2014-10-08 18:05:38 UTC) #5
bbudge
David: I'll definitely run benchmarks and check some apps that use it before trying to ...
6 years, 2 months ago (2014-10-08 21:44:35 UTC) #6
dmichael (off chromium)
Most of the comments here are just outlining a very slightly different way to structure ...
6 years, 2 months ago (2014-10-08 22:42:40 UTC) #7
bbudge
https://codereview.chromium.org/632113003/diff/80001/content/browser/renderer_host/pepper/pepper_udp_socket_message_filter.cc File content/browser/renderer_host/pepper/pepper_udp_socket_message_filter.cc (right): https://codereview.chromium.org/632113003/diff/80001/content/browser/renderer_host/pepper/pepper_udp_socket_message_filter.cc#newcode375 content/browser/renderer_host/pepper/pepper_udp_socket_message_filter.cc:375: DoPendingSend(); On 2014/10/08 22:42:40, dmichael wrote: > I think ...
6 years, 2 months ago (2014-10-09 00:18:26 UTC) #8
dmichael (off chromium)
https://codereview.chromium.org/632113003/diff/100001/content/browser/renderer_host/pepper/pepper_udp_socket_message_filter.cc File content/browser/renderer_host/pepper/pepper_udp_socket_message_filter.cc (right): https://codereview.chromium.org/632113003/diff/100001/content/browser/renderer_host/pepper/pepper_udp_socket_message_filter.cc#newcode388 content/browser/renderer_host/pepper/pepper_udp_socket_message_filter.cc:388: OnSendToCompleted(net_result); Oh, I realized this still has the slight ...
6 years, 2 months ago (2014-10-09 15:44:24 UTC) #9
yzshen1
"""Yuzhu: Would it make sense to add an option that allows the plugin to specify ...
6 years, 2 months ago (2014-10-09 16:35:26 UTC) #10
bbudge
https://codereview.chromium.org/632113003/diff/100001/content/browser/renderer_host/pepper/pepper_udp_socket_message_filter.cc File content/browser/renderer_host/pepper/pepper_udp_socket_message_filter.cc (right): https://codereview.chromium.org/632113003/diff/100001/content/browser/renderer_host/pepper/pepper_udp_socket_message_filter.cc#newcode372 content/browser/renderer_host/pepper/pepper_udp_socket_message_filter.cc:372: FlushPendingSends(); On 2014/10/09 16:35:26, yzshen1 wrote: > If a ...
6 years, 2 months ago (2014-10-09 21:46:17 UTC) #11
bbudge
6 years, 2 months ago (2014-10-09 23:11:01 UTC) #12
dmichael (off chromium)
lgtm, thanks for being patient with my bikeshedding
6 years, 2 months ago (2014-10-10 16:40:36 UTC) #13
bbudge
On 2014/10/10 16:40:36, dmichael wrote: > lgtm, thanks for being patient with my bikeshedding It's ...
6 years, 2 months ago (2014-10-10 16:52:44 UTC) #14
dmichael (off chromium)
Are you still planning to land this? Are you waiting for performance data?
5 years, 11 months ago (2015-01-14 17:58:36 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/632113003/400001
5 years, 11 months ago (2015-01-14 22:32:00 UTC) #17
bbudge
On 2015/01/14 17:58:36, dmichael wrote: > Are you still planning to land this? Are you ...
5 years, 11 months ago (2015-01-14 22:32:01 UTC) #18
commit-bot: I haz the power
Committed patchset #10 (id:400001)
5 years, 11 months ago (2015-01-14 22:42:28 UTC) #19
commit-bot: I haz the power
5 years, 11 months ago (2015-01-14 22:43:18 UTC) #20
Message was sent while issue was closed.
Patchset 10 (id:??) landed as
https://crrev.com/c76a0f987cf778d0cb14da86f132af9a0b200f72
Cr-Commit-Position: refs/heads/master@{#311563}

Powered by Google App Engine
This is Rietveld 408576698