diff options
author | wez@chromium.org <wez@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-20 07:26:17 +0000 |
---|---|---|
committer | wez@chromium.org <wez@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-20 07:26:17 +0000 |
commit | 725cdcb206d326b57f728669b655e022ce7faa05 (patch) | |
tree | 6e2b40efda3a3b12fba837c9d4a49a4521c0bf95 /remoting/host/plugin | |
parent | 3db1c1ddb4dfbb87ead6dc360875c06fdc4d30fe (diff) | |
download | chromium_src-725cdcb206d326b57f728669b655e022ce7faa05.zip chromium_src-725cdcb206d326b57f728669b655e022ce7faa05.tar.gz chromium_src-725cdcb206d326b57f728669b655e022ce7faa05.tar.bz2 |
Fix handling of DesktopEnvironment creation failure.
BUG=
TEST=
Review URL: http://codereview.chromium.org/7694013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97570 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/host/plugin')
-rw-r--r-- | remoting/host/plugin/host_script_object.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/remoting/host/plugin/host_script_object.cc b/remoting/host/plugin/host_script_object.cc index 72449d9..b02135d 100644 --- a/remoting/host/plugin/host_script_object.cc +++ b/remoting/host/plugin/host_script_object.cc @@ -463,10 +463,6 @@ void HostNPScriptObject::FinishConnect( return; } - // Nothing went wrong, so lets save the host, config and request. - host_config_ = host_config; - register_request_.reset(register_request.release()); - // Create DesktopEnvironment. desktop_environment_.reset(DesktopEnvironment::Create(&host_context_)); if (desktop_environment_.get() == NULL) { @@ -474,6 +470,10 @@ void HostNPScriptObject::FinishConnect( return; } + // Beyond this point nothing can fail, so save the config and request. + host_config_ = host_config; + register_request_.reset(register_request.release()); + // Create the Host. LOG(INFO) << "Connecting with NAT state: " << nat_traversal_enabled_; host_ = ChromotingHost::Create( |