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 /win8 | |
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 'win8')
-rw-r--r-- | win8/test/ui_automation_client.cc | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/win8/test/ui_automation_client.cc b/win8/test/ui_automation_client.cc index 8c866308..ef742f2 100644 --- a/win8/test/ui_automation_client.cc +++ b/win8/test/ui_automation_client.cc @@ -158,11 +158,7 @@ HRESULT UIAutomationClient::Context::EventHandler::HandleAutomationEvent( base::WeakPtr<UIAutomationClient::Context> UIAutomationClient::Context::Create() { Context* context = new Context(); - base::WeakPtr<Context> context_ptr(context->weak_ptr_factory_.GetWeakPtr()); - // Unbind from this thread so that the instance will bind to the automation - // thread when Initialize is called. - context->weak_ptr_factory_.DetachFromThread(); - return context_ptr; + return context->weak_ptr_factory_.GetWeakPtr(); } void UIAutomationClient::Context::DeleteOnAutomationThread() { |