Add the GPU process as a sandbox broker peer. (bug 1289895, r=bobowen)
authorDavid Anderson <danderson@mozilla.com>
Wed, 27 Jul 2016 23:17:54 -0700
changeset 332063 003c650290a078c27d5cd2a495ae7a42ccc41598
parent 332062 43cf27f0e2edb5136c1fa3fe415841f52ee62ec9
child 332064 0bea94bc88114b495b5a380a99cf680c9b6cd5b8
push id9858
push userjlund@mozilla.com
push dateMon, 01 Aug 2016 14:37:10 +0000
treeherdermozilla-aurora@203106ef6cb6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbobowen
bugs1289895
milestone50.0a1
Add the GPU process as a sandbox broker peer. (bug 1289895, r=bobowen)
ipc/glue/GeckoChildProcessHost.cpp
--- a/ipc/glue/GeckoChildProcessHost.cpp
+++ b/ipc/glue/GeckoChildProcessHost.cpp
@@ -1120,19 +1120,20 @@ GeckoChildProcessHost::PerformAsyncLaunc
         cmdLine.command_line_string().c_str());
     }
   } else
 #endif
   {
     base::LaunchApp(cmdLine, false, false, &process);
 
 #ifdef MOZ_SANDBOX
-    // We need to be able to duplicate handles to non-sandboxed content and GMP
-    // processes, so add it as a target peer.
+    // We need to be able to duplicate handles to some types of non-sandboxed
+    // child processes.
     if (mProcessType == GeckoProcessType_Content ||
+        mProcessType == GeckoProcessType_GPU ||
         mProcessType == GeckoProcessType_GMPlugin) {
       if (!mSandboxBroker.AddTargetPeer(process)) {
         NS_WARNING("Failed to add content process as target peer.");
       }
     }
 #endif
   }