DescriptionRemove all but one use of WeakPtrFactory::DetachFromThread.
This CL changes WeakPtr in the following ways:
* Changes thread-bindings semantics so that WeakPtrs only become bound when the first one is dereferenced, or the owning factory invalidates them.
* Removes WeakPtrFactory::DetachFromThread.
* Renames SupportsWeakPtr::DetachFromThread to DetachFromThreadHack.
Calling code changes to allow this:
* Unnecessary DetachFromThread() calls removed from PluginInfoMessageFilter, DhcpProxyScript[Adapter]FetcherWin and (Chromoting's) PolicyWatcherLinux.
* DetachFromThread() calls rendered unnecessary by change in binding semantics removed from IOThread, SearchProviderInstallData, RuleRegistryWithCache and GLSurfaceGlx.
WebGraphicsContext3DInProcessCommandBufferImpl uses the re-named DetachFromThreadHack() - bug 234964 tracks work to remove that use.
BUG=232143, 234964
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=202038
Patch Set 1 #Patch Set 2 : Remove DetachFromThread. #Patch Set 3 : Reinstate DetachFromThread as DetachFromThreadHack, with comments. #Patch Set 4 : Fix unit tests #Patch Set 5 : Remove unnecessary DetachFromThread calls from DhcpProxyScript* classes. #Patch Set 6 : Remove unnecessary DetachFromThread from UIAutomationClient #Patch Set 7 : Update unit-tests and fix typo. #Patch Set 8 : Reinstate HasOnRef() special-case. #Patch Set 9 : Add text to DCHECKs and tweak example. #Patch Set 10 : Simplify change to IOThread. #
Total comments: 4
Patch Set 11 : Address review comments. #Patch Set 12 : Simplify threading comments. #
Total comments: 2
Patch Set 13 : Check that tests fail with the correct error. #Patch Set 14 : Remove checks for death with correct error, which seem to fail on iOS #Messages
Total messages: 16 (0 generated)
|