| Index: remoting/client/jni/jni_pairing_secret_fetcher.cc
|
| diff --git a/remoting/client/jni/jni_pairing_secret_fetcher.cc b/remoting/client/jni/jni_pairing_secret_fetcher.cc
|
| index f6593271c12120bf3108fedb6896d70cac1d0f6e..39a36520e13e261c40032a5c589f69e6adb4c16c 100644
|
| --- a/remoting/client/jni/jni_pairing_secret_fetcher.cc
|
| +++ b/remoting/client/jni/jni_pairing_secret_fetcher.cc
|
| @@ -16,7 +16,9 @@ JniPairingSecretFetcher::JniPairingSecretFetcher(ChromotingJniRuntime* runtime,
|
| jni_runtime_(runtime),
|
| jni_client_(client),
|
| host_id_(host_id),
|
| - weak_factory_(this) {}
|
| + weak_factory_(this) {
|
| + weak_ptr_ = weak_factory_.GetWeakPtr();
|
| +}
|
|
|
| JniPairingSecretFetcher::~JniPairingSecretFetcher() {
|
| DCHECK(jni_runtime_->network_task_runner()->BelongsToCurrentThread());
|
| @@ -42,7 +44,7 @@ void JniPairingSecretFetcher::ProvideSecret(const std::string& pin) {
|
| }
|
|
|
| base::WeakPtr<JniPairingSecretFetcher> JniPairingSecretFetcher::GetWeakPtr() {
|
| - return weak_factory_.GetWeakPtr();
|
| + return weak_ptr_;
|
| }
|
|
|
| // static
|
|
|