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

Unified Diff: chrome/browser/renderer_host/browser_render_process_host.cc

Issue 27228: Fix BrowserTest.ThirtyFourTabs and possibly other ui tests in single-process ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 10 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
« chrome/browser/browser_uitest.cc ('K') | « chrome/browser/browser_uitest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/renderer_host/browser_render_process_host.cc
===================================================================
--- chrome/browser/renderer_host/browser_render_process_host.cc (revision 10506)
+++ chrome/browser/renderer_host/browser_render_process_host.cc (working copy)
@@ -71,11 +71,14 @@
// ----------------------------------------------------------------------------
+// This class creates the IO thread for the renderer when running in
+// single-process mode. It's not used in multi-process mode.
class RendererMainThread : public base::Thread {
public:
explicit RendererMainThread(const std::wstring& channel_id)
: base::Thread("Chrome_InProcRendererThread"),
- channel_id_(channel_id) {
+ channel_id_(channel_id),
+ render_process_(NULL) {
}
protected:
@@ -84,7 +87,7 @@
CoInitialize(NULL);
#endif
- render_process_.reset(new RenderProcess(channel_id_));
+ render_process_ = new RenderProcess(channel_id_);
// It's a little lame to manually set this flag. But the single process
// RendererThread will receive the WM_QUIT. We don't need to assert on
// this thread, so just force the flag manually.
@@ -94,7 +97,7 @@
}
virtual void CleanUp() {
- render_process_.reset();
+ delete render_process_;
#if defined(OS_WIN)
CoUninitialize();
@@ -103,7 +106,8 @@
private:
std::wstring channel_id_;
- scoped_ptr<RenderProcess> render_process_;
+ // Deleted in CleanUp() on the renderer thread, so don't use a smart pointer.
+ RenderProcess* render_process_;
};
// Used for a View_ID where the renderer has not been attached yet
« chrome/browser/browser_uitest.cc ('K') | « chrome/browser/browser_uitest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698