diff options
author | nduca@google.com <nduca@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-23 20:13:29 +0000 |
---|---|---|
committer | nduca@google.com <nduca@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-23 20:13:29 +0000 |
commit | 21635ad71eee5f503e24b784b4a02ca8ea26162b (patch) | |
tree | 084a36a122c38c6db5412f29c3a18d834acaf21c /sync | |
parent | 53c92d145869ed5775a464f4cb9d03933c905af3 (diff) | |
download | chromium_src-21635ad71eee5f503e24b784b4a02ca8ea26162b.zip chromium_src-21635ad71eee5f503e24b784b4a02ca8ea26162b.tar.gz chromium_src-21635ad71eee5f503e24b784b4a02ca8ea26162b.tar.bz2 |
Revert 128547 - gdata: Fix WeakPtr failures from GDataFileSystem
The problem was that we had a WeakPtrFactory created on UI thread in
the constructor of GDataFileSystem, and used it on UI and IO threads,
which we should not (i.e. WeakPtrFactory should only be used on the
thread where the factory was created).
The solution is to create separate factories for UI and IO threads,
and use them on the right threads. To make shutdown safe,
ShutdownOnUIThread() is introduced, which does most parts of
shutdown on UI thread, and then the destructor is called on IO
thread to delete the WeakPtrFactory bound to IO thread.
This shutdown sequence is rather tricky, but a commonly used pattern
in network related code in Chrome.
BUG=chromium-os:28292
TEST=play with the file manager on Debug build, and no assertions failed.
Review URL: https://chromiumcodereview.appspot.com/9835043
TBR=satorux@chromium.org
Review URL: https://chromiumcodereview.appspot.com/9837056
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@128566 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sync')
0 files changed, 0 insertions, 0 deletions