summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorcpu@google.com <cpu@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-16 19:31:34 +0000
committercpu@google.com <cpu@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-16 19:31:34 +0000
commitbdef78b5707e7f667a1e9c438b763cfedbda8177 (patch)
tree684efb63be9cccf4b8411459ba6674fde4bde2fc /chrome
parentba03f782b484db61cbeced187b1548ef3b4161f6 (diff)
downloadchromium_src-bdef78b5707e7f667a1e9c438b763cfedbda8177.zip
chromium_src-bdef78b5707e7f667a1e9c438b763cfedbda8177.tar.gz
chromium_src-bdef78b5707e7f667a1e9c438b763cfedbda8177.tar.bz2
Don't call COM stuff in the renderer
- Remove calls to CoInitialize / CoUninitialize - CoUninitialize sometimes causes the OS to try to load oleauth.dll - An exception for in-process-plugins. BUG=10589 Review URL: http://codereview.chromium.org/75028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13866 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/renderer/render_thread.cc15
1 files changed, 7 insertions, 8 deletions
diff --git a/chrome/renderer/render_thread.cc b/chrome/renderer/render_thread.cc
index 7909ec0..5c084bb 100644
--- a/chrome/renderer/render_thread.cc
+++ b/chrome/renderer/render_thread.cc
@@ -100,11 +100,11 @@ static WebAppCacheContext* CreateAppCacheContextForRenderer() {
}
void RenderThread::Init() {
- // TODO(darin): Why do we need COM here? This is probably bogus. Perhaps
- // this is for InProcessPlugin support?
#if defined(OS_WIN)
- // The renderer thread should wind-up COM.
- CoInitialize(0);
+ // If you are running plugins in this thread you need COM active but in
+ // the normal case you don't.
+ if (RenderProcess::InProcessPlugins())
+ CoInitialize(0);
#endif
ChildThread::Init();
@@ -143,10 +143,9 @@ void RenderThread::CleanUp() {
#if defined(OS_WIN)
// Clean up plugin channels before this thread goes away.
PluginChannelBase::CleanupChannels();
-#endif
-
-#if defined(OS_WIN)
- CoUninitialize();
+ // Don't call COM if the renderer is in the sandbox.
+ if (RenderProcess::InProcessPlugins())
+ CoUninitialize();
#endif
}