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

Issue 10124004: Reland 10000004 - Make the CancellableSyncSocket non-blocking on Send, and blocking on Receive (Closed)

Created:
8 years, 8 months ago by no longer working on chromium
Modified:
8 years, 8 months ago
CC:
chromium-reviews, erikwright (departed), jam, joi+watch-content_chromium.org, feature-media-reviews_chromium.org, darin-cc_chromium.org, brettw-cc_chromium.org
Visibility:
Public.

Description

Revert revert 132842 If we are using blocking write, when the renderer stop getting the data without notifying the browser, it will hang the browser. This happens with some plugins which use the sync sockets provided by the Pepper. This patch change CancellableSyncSocket to be non-blocking on sending, so that we don't need to worry the whole browser hangs by one plugin application. Also, we remove the lock in audio_sync_reader.cc since it is not really needed if we don't set the socket_ to NULL when calling Close(). By doing this we allow the user to close the socket while another thread is writing to the socket. BUG=121152 TEST=ipc_tests TBR=tommi@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=132975

Patch Set 1 #

Patch Set 2 : addressed Tommi's comment and remove that line of code instead. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+132 lines, -33 lines) Patch
M base/sync_socket.h View 3 chunks +10 lines, -4 lines 0 comments Download
M base/sync_socket_posix.cc View 3 chunks +23 lines, -2 lines 0 comments Download
M base/sync_socket_win.cc View 3 chunks +27 lines, -11 lines 0 comments Download
M content/browser/renderer_host/media/audio_sync_reader.h View 1 chunk +0 lines, -6 lines 0 comments Download
M content/browser/renderer_host/media/audio_sync_reader.cc View 2 chunks +1 line, -3 lines 0 comments Download
M ipc/sync_socket_unittest.cc View 1 4 chunks +71 lines, -7 lines 0 comments Download

Powered by Google App Engine
This is Rietveld 408576698