No longer keep a lingering reference to TypedUrlDataTypeController after PSS exits
BUG=127706
TEST=Start chrome, sign in to sync, start print job spooling and exit while the print job is spooling, should not get a crash.
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=137628
http://codereview.chromium.org/10391080/diff/12002/chrome/browser/sync/glue/typed_url_data_type_controller.h File chrome/browser/sync/glue/typed_url_data_type_controller.h (right): http://codereview.chromium.org/10391080/diff/12002/chrome/browser/sync/glue/typed_url_data_type_controller.h#newcode65 chrome/browser/sync/glue/typed_url_data_type_controller.h:65: PrefChangeRegistrar pref_registrar_; To some extent, I kind of feel ...
8 years, 7 months ago
(2012-05-16 22:40:57 UTC)
#7
http://codereview.chromium.org/10391080/diff/12002/chrome/browser/sync/glue/t...
File chrome/browser/sync/glue/typed_url_data_type_controller.h (right):
http://codereview.chromium.org/10391080/diff/12002/chrome/browser/sync/glue/t...
chrome/browser/sync/glue/typed_url_data_type_controller.h:65:
PrefChangeRegistrar pref_registrar_;
To some extent, I kind of feel like it's a bug for PrefChangeRegistrar to be
using raw pointers instead of WeakPointers in the first place, which I believe
was where the crash came from.
http://codereview.chromium.org/10391080/diff/12002/chrome/browser/sync/profil...
File chrome/browser/sync/profile_sync_service.cc (right):
http://codereview.chromium.org/10391080/diff/12002/chrome/browser/sync/profil...
chrome/browser/sync/profile_sync_service.cc:164:
DCHECK(iter->second->HasOneRef())
This does not hold true for non-UI thread datatypes implementing the new API,
where not blocking shutdown was one of our goals. In those cases, we don't
bother to wait for them to finish stopping, since we have an disconnect-able
interface that they must go through to interact with sync.
In other words, once DTC::Stop() is called, the datatype won't be able to
interact with the PSS or anything within sync, letting us continue without
blocking shutdown. The DTC ma have running/pending tasks on the datatype's
thread that don't execute until after Stop(), but we ensure correctness.
What do you think about, at least for new DTC's, just making it clear that no
member of the DTC should rely on the profile being around after Stop is called
(either by clearing these members during Stop() or by ensuring they are POD's)?
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/atwilson@chromium.org/10391080/8006
8 years, 7 months ago
(2012-05-17 02:27:28 UTC)
#8
Issue 10391080: No longer keep a lingering reference to TypedUrlDataTypeController after PSS exits
(Closed)
Created 8 years, 7 months ago by Andrew T Wilson (Slow)
Modified 8 years, 7 months ago
Reviewers: lipalani1, Nicolas Zea
Base URL: svn://svn.chromium.org/chrome/trunk/src
Comments: 10