Chromium Code Reviews| Index: chrome/renderer/render_thread.cc |
| =================================================================== |
| --- chrome/renderer/render_thread.cc (revision 13641) |
| +++ chrome/renderer/render_thread.cc (working copy) |
| @@ -100,11 +100,10 @@ |
| } |
| 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); |
| + // The renderer thread should wind-up COM, if not in the sandbox. |
|
jam
2009/04/16 03:31:40
nit: I would make the comment (and the one below)
|
| + if (RenderProcess::InProcessPlugins()) |
| + CoInitialize(0); |
| #endif |
| ChildThread::Init(); |
| @@ -143,11 +142,10 @@ |
| #if defined(OS_WIN) |
| // Clean up plugin channels before this thread goes away. |
| PluginChannelBase::CleanupChannels(); |
| + // Don't call COM if the renderer is in the sandbox. |
| + if (RenderProcess::InProcessPlugins()) |
| + CoUninitialize(); |
| #endif |
| - |
| -#if defined(OS_WIN) |
| - CoUninitialize(); |
| -#endif |
| } |
| void RenderThread::OnUpdateVisitedLinks(base::SharedMemoryHandle table) { |