summaryrefslogtreecommitdiffstats
path: root/chrome/browser/renderer_host
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-17 22:45:34 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-17 22:45:34 +0000
commitb689fce776a394377fed51ae063942509a2988a1 (patch)
treeeb52e9944db424e9e1b80bcefe9b9b96b1c27b50 /chrome/browser/renderer_host
parent84ae20cba3059760948ca5d1f313dc25c74b26d6 (diff)
downloadchromium_src-b689fce776a394377fed51ae063942509a2988a1.zip
chromium_src-b689fce776a394377fed51ae063942509a2988a1.tar.gz
chromium_src-b689fce776a394377fed51ae063942509a2988a1.tar.bz2
Merge DOMUIContents into WebContents.
I did a lot of cleanup of the DOM UI system as part of this. Review URL: http://codereview.chromium.org/42227 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11925 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/renderer_host')
-rw-r--r--chrome/browser/renderer_host/browser_render_process_host.cc19
1 files changed, 14 insertions, 5 deletions
diff --git a/chrome/browser/renderer_host/browser_render_process_host.cc b/chrome/browser/renderer_host/browser_render_process_host.cc
index 877e0a7..7aeb243 100644
--- a/chrome/browser/renderer_host/browser_render_process_host.cc
+++ b/chrome/browser/renderer_host/browser_render_process_host.cc
@@ -217,13 +217,18 @@ bool BrowserRenderProcessHost::Init() {
// be doing.
channel_->set_sync_messages_with_no_timeout_allowed(false);
- // build command line for renderer, we have to quote the executable name to
- // deal with spaces
+ // Build command line for renderer, we have to quote the executable name to
+ // deal with spaces.
std::wstring renderer_path =
browser_command_line.GetSwitchValue(switches::kRendererPath);
- if (renderer_path.empty())
- if (!GetRendererPath(&renderer_path))
+ if (renderer_path.empty()) {
+ if (!GetRendererPath(&renderer_path)) {
+ // Need to reset the channel we created above or others might think the
+ // connection is live.
+ channel_.reset();
return false;
+ }
+ }
CommandLine cmd_line(renderer_path);
if (logging::DialogsAreSuppressed())
cmd_line.AppendSwitch(switches::kNoErrorDialogs);
@@ -358,11 +363,13 @@ bool BrowserRenderProcessHost::Init() {
if (!AddGenericPolicy(policy)) {
NOTREACHED();
+ channel_.reset();
return false;
}
if (!AddDllEvictionPolicy(policy)) {
NOTREACHED();
+ channel_.reset();
return false;
}
@@ -375,8 +382,10 @@ bool BrowserRenderProcessHost::Init() {
if (desktop)
CloseDesktop(desktop);
- if (sandbox::SBOX_ALL_OK != result)
+ if (sandbox::SBOX_ALL_OK != result) {
+ channel_.reset();
return false;
+ }
bool on_sandbox_desktop = (desktop != NULL);
NotificationService::current()->Notify(