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

Side by Side Diff: base/message_loop.cc

Issue 8343033: Add CHECK to catch places where BrowserProcessImpl's refcount goes to 0. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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 | « base/message_loop.h ('k') | chrome/browser/browser_process_impl.cc » ('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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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.h" 5 #include "base/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 390 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 DCHECK_EQ(this, current()); 401 DCHECK_EQ(this, current());
402 task_observers_.RemoveObserver(task_observer); 402 task_observers_.RemoveObserver(task_observer);
403 } 403 }
404 404
405 void MessageLoop::AssertIdle() const { 405 void MessageLoop::AssertIdle() const {
406 // We only check |incoming_queue_|, since we don't want to lock |work_queue_|. 406 // We only check |incoming_queue_|, since we don't want to lock |work_queue_|.
407 base::AutoLock lock(incoming_queue_lock_); 407 base::AutoLock lock(incoming_queue_lock_);
408 DCHECK(incoming_queue_.empty()); 408 DCHECK(incoming_queue_.empty());
409 } 409 }
410 410
411 bool MessageLoop::is_running() const {
412 DCHECK_EQ(this, current());
413 return state_ != NULL;
414 }
415
411 //------------------------------------------------------------------------------ 416 //------------------------------------------------------------------------------
412 417
413 // Runs the loop in two different SEH modes: 418 // Runs the loop in two different SEH modes:
414 // enable_SEH_restoration_ = false : any unhandled exception goes to the last 419 // enable_SEH_restoration_ = false : any unhandled exception goes to the last
415 // one that calls SetUnhandledExceptionFilter(). 420 // one that calls SetUnhandledExceptionFilter().
416 // enable_SEH_restoration_ = true : any unhandled exception goes to the filter 421 // enable_SEH_restoration_ = true : any unhandled exception goes to the filter
417 // that was existed before the loop was run. 422 // that was existed before the loop was run.
418 void MessageLoop::RunHandler() { 423 void MessageLoop::RunHandler() {
419 #if defined(OS_WIN) 424 #if defined(OS_WIN)
420 if (exception_restoration_) { 425 if (exception_restoration_) {
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after
871 Watcher *delegate) { 876 Watcher *delegate) {
872 return pump_libevent()->WatchFileDescriptor( 877 return pump_libevent()->WatchFileDescriptor(
873 fd, 878 fd,
874 persistent, 879 persistent,
875 static_cast<base::MessagePumpLibevent::Mode>(mode), 880 static_cast<base::MessagePumpLibevent::Mode>(mode),
876 controller, 881 controller,
877 delegate); 882 delegate);
878 } 883 }
879 884
880 #endif 885 #endif
OLDNEW
« no previous file with comments | « base/message_loop.h ('k') | chrome/browser/browser_process_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698