Index: chrome/browser/sync/glue/sync_backend_host_core.cc |
diff --git a/chrome/browser/sync/glue/sync_backend_host_core.cc b/chrome/browser/sync/glue/sync_backend_host_core.cc |
index c433b0b3df96046427e6e0d2d94c0245df866300..d1ac1068bb4051783908322c420f6942d9643dc0 100644 |
--- a/chrome/browser/sync/glue/sync_backend_host_core.cc |
+++ b/chrome/browser/sync/glue/sync_backend_host_core.cc |
@@ -473,16 +473,26 @@ void SyncBackendHostCore::DoInitialProcessControlTypes() { |
} |
void SyncBackendHostCore::DoFinishInitialProcessControlTypes() { |
+ DCHECK_EQ(base::MessageLoop::current(), sync_loop_); |
+ |
registrar_->ActivateDataType(syncer::DEVICE_INFO, |
syncer::GROUP_PASSIVE, |
synced_device_tracker_.get(), |
sync_manager_->GetUserShare()); |
+ base::WeakPtr<syncer::SyncCore> sync_core = sync_manager_->GetSyncCore(); |
+ |
+ // De-reference the WeakPtr while we're here to signal to the debugging |
+ // mechanisms that it belongs to the sync thread. This helps us DCHECK |
+ // earlier if the pointer is misused. |
+ sync_core.get(); |
Nicolas Zea
2014/04/02 23:19:05
I don't think this is necessary. A weak pointer al
rlarocque
2014/04/03 01:03:46
IIRC, I added this statement because it helped me
Nicolas Zea
2014/04/03 17:52:15
Huh, I missed that. Fair enough then.
|
+ |
host_.Call( |
FROM_HERE, |
&SyncBackendHostImpl::HandleInitializationSuccessOnFrontendLoop, |
js_backend_, |
- debug_info_listener_); |
+ debug_info_listener_, |
+ sync_core); |
js_backend_.Reset(); |
debug_info_listener_.Reset(); |