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

Unified Diff: webkit/glue/plugins/pepper_audio.cc

Issue 5522003: Fix a race condition in proxied audio.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/plugins/pepper_audio.cc
===================================================================
--- webkit/glue/plugins/pepper_audio.cc (revision 68026)
+++ webkit/glue/plugins/pepper_audio.cc (working copy)
@@ -336,10 +336,13 @@
PP_RunCompletionCallback(&create_callback_, 0);
create_callback_pending_ = false;
- // Close the handles now that this process is done with them.
- shared_memory_for_create_callback_.reset();
- shared_memory_size_for_create_callback_ = 0;
- socket_for_create_callback_.reset();
+ // It might be nice to close the handles here to free up some system
+ // resources, but we can't since there's a race condition. The handles must
+ // be valid until they're sent over IPC, which is done from the I/O thread
+ // which will often get done after this code executes. We could do
+ // something more elaborate like an ACK from the plugin or post a task to
+ // the I/O thread and back, but this extra complexity doesn't seem worth it
+ // just to clean up these handles faster.
} else {
SetStreamInfo(shared_memory_handle, shared_memory_size, socket_handle);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698