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

Unified Diff: components/nacl/renderer/ppb_nacl_private_impl.cc

Issue 2302053004: Use ChannelMojo for plugin-renderer channels. (Closed)
Patch Set: Created 4 years, 2 months 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 | content/browser/pepper_flash_settings_helper_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/nacl/renderer/ppb_nacl_private_impl.cc
diff --git a/components/nacl/renderer/ppb_nacl_private_impl.cc b/components/nacl/renderer/ppb_nacl_private_impl.cc
index 354b61cd6a1c691083ab920592dcc07f881b4318..cd6aa0cfa93c5e892575cd30100b4ea67883d199 100644
--- a/components/nacl/renderer/ppb_nacl_private_impl.cc
+++ b/components/nacl/renderer/ppb_nacl_private_impl.cc
@@ -130,14 +130,11 @@ class NaClPluginInstance {
explicit NaClPluginInstance(PP_Instance instance)
: nexe_load_manager(instance), pexe_size(0) {}
~NaClPluginInstance() {
- // Make sure that we do not leak a file descriptor if the NaCl loader
+ // Make sure that we do not leak a mojo handle if the NaCl loader
// process never called ppapi_start() to initialize PPAPI.
if (instance_info) {
-#if defined(OS_WIN)
- base::win::ScopedHandle closer(instance_info->channel_handle.pipe.handle);
-#else
- base::ScopedFD closer(instance_info->channel_handle.socket.fd);
-#endif
+ DCHECK(instance_info->channel_handle.is_mojo_channel_handle());
+ instance_info->channel_handle.mojo_handle.Close();
}
}
« no previous file with comments | « no previous file | content/browser/pepper_flash_settings_helper_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698