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

Side by Side Diff: base/message_loop/message_loop.cc

Issue 15709015: Make sure that the UI window created by base::MessagePumpForUI is destoyed on the same thread (Wind… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 7 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | base/message_loop/message_pump.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/message_loop/message_loop.h" 5 #include "base/message_loop/message_loop.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 FOR_EACH_OBSERVER(DestructionObserver, destruction_observers_, 214 FOR_EACH_OBSERVER(DestructionObserver, destruction_observers_,
215 WillDestroyCurrentMessageLoop()); 215 WillDestroyCurrentMessageLoop());
216 216
217 thread_task_runner_handle_.reset(); 217 thread_task_runner_handle_.reset();
218 218
219 // Tell the message_loop_proxy that we are dying. 219 // Tell the message_loop_proxy that we are dying.
220 static_cast<MessageLoopProxyImpl*>(message_loop_proxy_.get())-> 220 static_cast<MessageLoopProxyImpl*>(message_loop_proxy_.get())->
221 WillDestroyCurrentMessageLoop(); 221 WillDestroyCurrentMessageLoop();
222 message_loop_proxy_ = NULL; 222 message_loop_proxy_ = NULL;
223 223
224 // Stop the message pump and free any thread-bound resources.
225 pump_->Shutdown();
226
224 // OK, now make it so that no one can find us. 227 // OK, now make it so that no one can find us.
225 lazy_tls_ptr.Pointer()->Set(NULL); 228 lazy_tls_ptr.Pointer()->Set(NULL);
226 229
227 #if defined(OS_WIN) 230 #if defined(OS_WIN)
228 // If we left the high-resolution timer activated, deactivate it now. 231 // If we left the high-resolution timer activated, deactivate it now.
229 // Doing this is not-critical, it is mainly to make sure we track 232 // Doing this is not-critical, it is mainly to make sure we track
230 // the high resolution timer activations properly in our unit tests. 233 // the high resolution timer activations properly in our unit tests.
231 if (!high_resolution_timer_expiration_.is_null()) { 234 if (!high_resolution_timer_expiration_.is_null()) {
232 Time::ActivateHighResolutionTimer(false); 235 Time::ActivateHighResolutionTimer(false);
233 high_resolution_timer_expiration_ = TimeTicks(); 236 high_resolution_timer_expiration_ = TimeTicks();
(...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after
825 fd, 828 fd,
826 persistent, 829 persistent,
827 mode, 830 mode,
828 controller, 831 controller,
829 delegate); 832 delegate);
830 } 833 }
831 834
832 #endif 835 #endif
833 836
834 } // namespace base 837 } // namespace base
OLDNEW
« no previous file with comments | « no previous file | base/message_loop/message_pump.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698