Skip to content
This repository has been archived by the owner on Apr 3, 2020. It is now read-only.

Commit

Permalink
Don't create a pairing registry on platforms that don't provide a del…
Browse files Browse the repository at this point in the history
…egate.

This was broken by https://codereview.chromium.org/834673007. Constructing
a PairingRegistry with a null delegate causes pairing to be offered, but if
selected, the host process will crash.

BUG=455501

Review URL: https://codereview.chromium.org/903963002

Cr-Commit-Position: refs/heads/master@{#314969}
  • Loading branch information
jamiewalch authored and Commit bot committed Feb 6, 2015
1 parent 7722ddf commit dbec99e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions remoting/host/remoting_me2me_host.cc
Original file line number Diff line number Diff line change
Expand Up @@ -629,8 +629,9 @@ void HostProcess::CreateAuthenticatorFactory() {
scoped_ptr<PairingRegistry::Delegate> delegate =
CreatePairingRegistryDelegate();

pairing_registry_ = new PairingRegistry(context_->file_task_runner(),
delegate.Pass());
if (delegate)
pairing_registry_ = new PairingRegistry(context_->file_task_runner(),
delegate.Pass());
}
#endif // defined(OS_WIN)

Expand Down

0 comments on commit dbec99e

Please sign in to comment.