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

Issue 6528004: Fix PPB_Audio_Proxy handling of file descriptors. (Closed)

Created:
9 years, 10 months ago by piman
Modified:
9 years, 7 months ago
Reviewers:
brettw
CC:
chromium-reviews
Visibility:
Public.

Description

Fix PPB_Audio_Proxy handling of file descriptors. Previous code was closing a file descriptor it shouldn't causing trouble when the real owner tried to close it again. BUG=none TEST=with pepper flash, load a youtube video with sound, reload the page, should see no assert. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=74894

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+2 lines, -2 lines) Patch
M ppapi/proxy/ppb_audio_proxy.cc View 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
piman
9 years, 10 months ago (2011-02-15 00:21:41 UTC) #1
brettw
9 years, 10 months ago (2011-02-15 00:22:56 UTC) #2
LGTM

On Mon, Feb 14, 2011 at 4:21 PM,  <piman@chromium.org> wrote:
> Reviewers: brettw,
>
> Description:
> Fix PPB_Audio_Proxy handling of file descriptors.
>
> Previous code was closing a file descriptor it shouldn't causing trouble
> when
> the real owner tried to close it again.
>
> BUG=none
> TEST=with pepper flash, load a youtube video with sound, reload the page,
> should
> see no assert.
>
> Please review this at http://codereview.chromium.org/6528004/
>
> SVN Base: svn://svn.chromium.org/chrome/trunk/src
>
> Affected files:
>  M ppapi/proxy/ppb_audio_proxy.cc
>
>
> Index: ppapi/proxy/ppb_audio_proxy.cc
> diff --git a/ppapi/proxy/ppb_audio_proxy.cc b/ppapi/proxy/ppb_audio_proxy.cc
> index
>
6adc436bf28476e30db3453d754bffea337c7c94..3e7350bf4297c305c21710f0030dd0a5954e2bac
> 100644
> --- a/ppapi/proxy/ppb_audio_proxy.cc
> +++ b/ppapi/proxy/ppb_audio_proxy.cc
> @@ -282,8 +282,8 @@ int32_t PPB_Audio_Proxy::GetAudioConnectedHandles(
>       FALSE, DUPLICATE_CLOSE_SOURCE);
>  #else
>   // On Posix, the socket handle will be auto-duplicated when we send the
> -  // FileDescriptor. Set AutoClose since we don't need the handle any more.
> -  *foreign_socket_handle = base::FileDescriptor(socket_handle, true);
> +  // FileDescriptor. Don't set AutoClose since this is not our handle.
> +  *foreign_socket_handle = base::FileDescriptor(socket_handle, false);
>  #endif
>
>   // Get the shared memory for the buffer.
>
>
>

Powered by Google App Engine
This is Rietveld 408576698