Commit cd717e25 authored by maxbogue's avatar maxbogue Committed by Commit bot

[Sync] Don't call start_callback_ if null in SMTP.

Still lost as to why it would be null, but this should stop crashes.

BUG=679657,673883

Review-Url: https://codereview.chromium.org/2622223003
Cr-Commit-Position: refs/heads/master@{#442978}
parent 302d9ac3
...@@ -102,17 +102,15 @@ void SharedModelTypeProcessor::ConnectIfReady() { ...@@ -102,17 +102,15 @@ void SharedModelTypeProcessor::ConnectIfReady() {
if (start_error_) { if (start_error_) {
error_handler_.Run(start_error_.value()); error_handler_.Run(start_error_.value());
start_error_.reset(); start_error_.reset();
start_callback_.Reset(); } else if (start_callback_) {
return;
}
auto activation_context = base::MakeUnique<ActivationContext>(); auto activation_context = base::MakeUnique<ActivationContext>();
activation_context->model_type_state = model_type_state_; activation_context->model_type_state = model_type_state_;
activation_context->type_processor = activation_context->type_processor =
base::MakeUnique<ModelTypeProcessorProxy>( base::MakeUnique<ModelTypeProcessorProxy>(
weak_ptr_factory_.GetWeakPtr(), base::ThreadTaskRunnerHandle::Get()); weak_ptr_factory_.GetWeakPtr(),
base::ThreadTaskRunnerHandle::Get());
start_callback_.Run(std::move(activation_context)); start_callback_.Run(std::move(activation_context));
}
start_callback_.Reset(); start_callback_.Reset();
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment