From 3c1e4d080a8e69fb973638d1360d4d5dd0d2e4d5 Mon Sep 17 00:00:00 2001 From: "jam@chromium.org" Date: Mon, 13 Oct 2008 22:28:39 +0000 Subject: Make plugin processes (except Gears) run at normal priority. This fixes a lot of the spurious unresponsive plugin dialogs, and also makes it so that the browser process isn't hung waiting for a low priority plugin process when cpu usage is high. I was able to simulate this by using 100% cpu in a test program. Before this change, the dialog always comes up and a flash video never plays. The browser process is also hung. With this change the video plays and I can interact with the browser. Review URL: http://codereview.chromium.org/7129 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3323 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/plugin_process_host.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/chrome/browser/plugin_process_host.cc b/chrome/browser/plugin_process_host.cc index b3db5f1..f039d07 100644 --- a/chrome/browser/plugin_process_host.cc +++ b/chrome/browser/plugin_process_host.cc @@ -440,8 +440,12 @@ bool PluginProcessHost::Init(const std::wstring& dll, watcher_.StartWatching(process_.handle(), this); - // Give all plugins "background" priority. See http://b/issue?id=1280317. - process_.SetProcessBackgrounded(true); + std::wstring gears_path; + if (PathService::Get(chrome::FILE_GEARS_PLUGIN, &gears_path) && + dll == gears_path) { + // Give Gears plugins "background" priority. See http://b/issue?id=1280317. + process_.SetProcessBackgrounded(true); + } opening_channel_ = true; -- cgit v1.1