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

Unified Diff: chrome/renderer/render_thread.cc

Issue 75028: Don't call COM stuff in the renderer... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 8 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698