forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert of [Sync] Stop accessing BrowserContextKeyedServiceFactory on …
…non-UI thread. (patchset chromium#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}
- Loading branch information
skym
authored and
Commit bot
committed
Apr 6, 2017
1 parent
e4e3e7e
commit a56dd49
Showing
30 changed files
with
235 additions
and
338 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.