diff options
author | wez@chromium.org <wez@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-24 09:51:34 +0000 |
---|---|---|
committer | wez@chromium.org <wez@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-24 09:51:34 +0000 |
commit | 1ade3f8634a12b3b149b5016d01a9b8b8c5979c5 (patch) | |
tree | d7647caa2218316eec4b591e4e4ffa251a39f2ca /net/proxy | |
parent | 1c98fddccecfa323f49bfe80c1c387be22494613 (diff) | |
download | chromium_src-1ade3f8634a12b3b149b5016d01a9b8b8c5979c5.zip chromium_src-1ade3f8634a12b3b149b5016d01a9b8b8c5979c5.tar.gz chromium_src-1ade3f8634a12b3b149b5016d01a9b8b8c5979c5.tar.bz2 |
Remove 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
Review URL: https://chromiumcodereview.appspot.com/14299011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@202038 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/proxy')
-rw-r--r-- | net/proxy/dhcp_proxy_script_adapter_fetcher_win.cc | 5 | ||||
-rw-r--r-- | net/proxy/dhcp_proxy_script_fetcher_win.cc | 5 |
2 files changed, 0 insertions, 10 deletions
diff --git a/net/proxy/dhcp_proxy_script_adapter_fetcher_win.cc b/net/proxy/dhcp_proxy_script_adapter_fetcher_win.cc index 8a405a7..2b49b94 100644 --- a/net/proxy/dhcp_proxy_script_adapter_fetcher_win.cc +++ b/net/proxy/dhcp_proxy_script_adapter_fetcher_win.cc @@ -41,11 +41,6 @@ DhcpProxyScriptAdapterFetcher::DhcpProxyScriptAdapterFetcher( DhcpProxyScriptAdapterFetcher::~DhcpProxyScriptAdapterFetcher() { Cancel(); - - // The WeakPtr we passed to the worker thread may be destroyed on the - // worker thread. This detaches any outstanding WeakPtr state from - // the current thread. - base::SupportsWeakPtr<DhcpProxyScriptAdapterFetcher>::DetachFromThread(); } void DhcpProxyScriptAdapterFetcher::Fetch( diff --git a/net/proxy/dhcp_proxy_script_fetcher_win.cc b/net/proxy/dhcp_proxy_script_fetcher_win.cc index 64f5117..9e34f51 100644 --- a/net/proxy/dhcp_proxy_script_fetcher_win.cc +++ b/net/proxy/dhcp_proxy_script_fetcher_win.cc @@ -47,11 +47,6 @@ DhcpProxyScriptFetcherWin::DhcpProxyScriptFetcherWin( DhcpProxyScriptFetcherWin::~DhcpProxyScriptFetcherWin() { // Count as user-initiated if we are not yet in STATE_DONE. Cancel(); - - // The WeakPtr we passed to the worker thread may be destroyed on the - // worker thread. This detaches any outstanding WeakPtr state from - // the current thread. - base::SupportsWeakPtr<DhcpProxyScriptFetcherWin>::DetachFromThread(); } int DhcpProxyScriptFetcherWin::Fetch(base::string16* utf16_text, |