summaryrefslogtreecommitdiffstats
path: root/win8/test
diff options
context:
space:
mode:
authorwez@chromium.org <wez@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-29 08:04:32 +0000
committerwez@chromium.org <wez@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-29 08:04:32 +0000
commited3f6734517af1ed0d084052e44a69b4583cf05b (patch)
tree5b3c76a47cf0385c2baa6e6a0d92d0fc43897637 /win8/test
parentd76c6f5a121a4c1bb32d96fdee0b7bd5a19bb41b (diff)
downloadchromium_src-ed3f6734517af1ed0d084052e44a69b4583cf05b.zip
chromium_src-ed3f6734517af1ed0d084052e44a69b4583cf05b.tar.gz
chromium_src-ed3f6734517af1ed0d084052e44a69b4583cf05b.tar.bz2
Remove all but one use of WeakPtrFactory::DetachFromThread.
This is a re-land of issue 14299011, which broke GLSurfaceGLX, in turn breaking Chrome Linux/Aura. 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 use of SupportsWeakPtr removed from SGIVideoSyncProviderThreadShim. * 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. TBR=darin,awong BUG=232143, 234964, 243914 Review URL: https://chromiumcodereview.appspot.com/16007009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@202811 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'win8/test')
-rw-r--r--win8/test/ui_automation_client.cc6
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() {