|
Revert of [Sync] Stop accessing BrowserContextKeyedServiceFactory on non-UI thread. (patchset #8 id:140001 of https://codereview.chromium.org/2769113002/ )
Reason for revert:
Caused a memory regression, see crbug.com/708666 , unclear to me why exactly this is. Progress investigating the memory regression seems tricky so far, so reverting to fix more quickly.
Original issue's description:
> [Sync] Stop accessing BrowserContextKeyedServiceFactory on non-UI thread.
>
> In the past the AsyncDirectoryTypeController was passing a raw pointer
> to a ChromeSyncClient to the model thread, where it had
> GetSyncableServiceForType called on it. This was needed for several
> model types, which has specific logic around only accessing their
> SyncableService on their model threads. However, this was also bad, as
> BrowserContextKeyedServiceFactorys were being used with a Profile
> object on a non-UI thread, which is against the rules.
>
> To fix this, GetSyncableServiceForType returns a callback which should
> only be run on the model thread, that will return the same
> WeakPtr<SyncableService> that we were used to. The various non-UI
> thread model types do slightly different things as each type has
> different rules and threading guarantees.
>
> The most involved model type in this CL was extensions, which did not
> have sufficient threading constraints to ensure safety. Added weak
> pointer support to SyncValueStoreCache to fix this.
>
> BUG= 701326
>
> Review-Url: https://codereview.chromium.org/2769113002
> Cr-Commit-Position: refs/heads/master@{#460304}
> Committed: https://chromium.googlesource.com/chromium/src/+/cd6b31d4b9613087e1a68c620af83b6fe1892bdf
TBR=pavely@chromium.org,rdevlin.cronin@chromium.org,mathp@chromium.org,vasilii@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG= 701326
Review-Url: https://codereview.chromium.org/2799653006
Cr-Commit-Position: refs/heads/master@{#462578}
Committed: https://chromium.googlesource.com/chromium/src/+/a56dd49ba64abaf5300e5ccd8874447821e53da1
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+239 lines, -342 lines) |
Patch |
|
M |
chrome/browser/extensions/api/storage/settings_apitest.cc
|
View
|
|
1 chunk |
+2 lines, -4 lines |
0 comments
|
Download
|
|
M |
chrome/browser/extensions/api/storage/settings_sync_util.h
|
View
|
|
3 chunks |
+6 lines, -6 lines |
0 comments
|
Download
|
|
M |
chrome/browser/extensions/api/storage/settings_sync_util.cc
|
View
|
|
5 chunks |
+23 lines, -33 lines |
0 comments
|
Download
|
|
M |
chrome/browser/extensions/api/storage/sync_value_store_cache.h
|
View
|
|
3 chunks |
+0 lines, -5 lines |
0 comments
|
Download
|
|
M |
chrome/browser/extensions/api/storage/sync_value_store_cache.cc
|
View
|
|
2 chunks |
+1 line, -5 lines |
0 comments
|
Download
|
|
M |
chrome/browser/sync/chrome_sync_client.h
|
View
|
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
|
M |
chrome/browser/sync/chrome_sync_client.cc
|
View
|
|
6 chunks |
+89 lines, -134 lines |
0 comments
|
Download
|
|
M |
components/autofill/core/browser/webdata/autofill_profile_data_type_controller.h
|
View
|
|
1 chunk |
+3 lines, -0 lines |
0 comments
|
Download
|
|
M |
components/autofill/core/browser/webdata/autofill_profile_data_type_controller.cc
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
components/browser_sync/profile_sync_test_util.cc
|
View
|
|
3 chunks |
+5 lines, -6 lines |
0 comments
|
Download
|
|
M |
components/search_engines/search_engine_data_type_controller_unittest.cc
|
View
|
|
2 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
|
M |
components/sync/driver/async_directory_type_controller.cc
|
View
|
|
1 chunk |
+2 lines, -7 lines |
0 comments
|
Download
|
|
M |
components/sync/driver/async_directory_type_controller_unittest.cc
|
View
|
|
1 chunk |
+1 line, -2 lines |
0 comments
|
Download
|
|
M |
components/sync/driver/directory_data_type_controller.h
|
View
|
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
|
M |
components/sync/driver/directory_data_type_controller.cc
|
View
|
|
2 chunks |
+0 lines, -2 lines |
0 comments
|
Download
|
|
M |
components/sync/driver/fake_generic_change_processor.h
|
View
|
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
components/sync/driver/fake_generic_change_processor.cc
|
View
|
|
2 chunks |
+4 lines, -3 lines |
0 comments
|
Download
|
|
M |
components/sync/driver/fake_sync_client.h
|
View
|
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
|
M |
components/sync/driver/fake_sync_client.cc
|
View
|
|
2 chunks |
+3 lines, -9 lines |
0 comments
|
Download
|
|
M |
components/sync/driver/generic_change_processor.h
|
View
|
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
components/sync/driver/generic_change_processor.cc
|
View
|
|
3 chunks |
+6 lines, -3 lines |
0 comments
|
Download
|
|
M |
components/sync/driver/generic_change_processor_factory.h
|
View
|
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
components/sync/driver/generic_change_processor_factory.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
components/sync/driver/generic_change_processor_unittest.cc
|
View
|
|
3 chunks |
+4 lines, -2 lines |
0 comments
|
Download
|
|
M |
components/sync/driver/shared_change_processor.h
|
View
|
|
4 chunks |
+5 lines, -8 lines |
0 comments
|
Download
|
|
M |
components/sync/driver/shared_change_processor.cc
|
View
|
|
4 chunks |
+13 lines, -13 lines |
0 comments
|
Download
|
|
M |
components/sync/driver/shared_change_processor_unittest.cc
|
View
|
|
2 chunks |
+4 lines, -5 lines |
0 comments
|
Download
|
|
M |
components/sync/driver/sync_client.h
|
View
|
|
2 chunks |
+5 lines, -6 lines |
0 comments
|
Download
|
|
M |
ios/chrome/browser/sync/ios_chrome_sync_client.h
|
View
|
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
|
M |
ios/chrome/browser/sync/ios_chrome_sync_client.mm
|
View
|
|
2 chunks |
+44 lines, -73 lines |
0 comments
|
Download
|
Total messages: 6 (3 generated)
|