Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1893)

Unified Diff: win8/test/ui_automation_client.cc

Issue 14299011: Remove all but one use of WeakPtrFactory::DetachFromThread. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove checks for death with correct error, which seem to fail on iOS Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: win8/test/ui_automation_client.cc
diff --git a/win8/test/ui_automation_client.cc b/win8/test/ui_automation_client.cc
index 8c8663083b9b85f3af3a8088c65c0506ce5ed353..ef742f20fecd2fe4cccb11c912e2182b5fe5909d 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() {
« no previous file with comments | « webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698