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

Side by Side Diff: base/message_loop.cc

Issue 6368094: -Wuninitialized fixes Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: '' Created 9 years, 10 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/process_util_posix.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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 DCHECK_EQ(this, current()); 158 DCHECK_EQ(this, current());
159 159
160 DCHECK(!state_); 160 DCHECK(!state_);
161 161
162 // Clean up any unprocessed tasks, but take care: deleting a task could 162 // Clean up any unprocessed tasks, but take care: deleting a task could
163 // result in the addition of more tasks (e.g., via DeleteSoon). We set a 163 // result in the addition of more tasks (e.g., via DeleteSoon). We set a
164 // limit on the number of times we will allow a deleted task to generate more 164 // limit on the number of times we will allow a deleted task to generate more
165 // tasks. Normally, we should only pass through this loop once or twice. If 165 // tasks. Normally, we should only pass through this loop once or twice. If
166 // we end up hitting the loop limit, then it is probably due to one task that 166 // we end up hitting the loop limit, then it is probably due to one task that
167 // is being stubborn. Inspect the queues to see who is left. 167 // is being stubborn. Inspect the queues to see who is left.
168 bool did_work; 168 bool did_work = false; // clang pr9061
169 for (int i = 0; i < 100; ++i) { 169 for (int i = 0; i < 100; ++i) {
170 DeletePendingTasks(); 170 DeletePendingTasks();
171 ReloadWorkQueue(); 171 ReloadWorkQueue();
172 // If we end up with empty queues, then break out of the loop. 172 // If we end up with empty queues, then break out of the loop.
173 did_work = DeletePendingTasks(); 173 did_work = DeletePendingTasks();
174 if (!did_work) 174 if (!did_work)
175 break; 175 break;
176 } 176 }
177 DCHECK(!did_work); 177 DCHECK(!did_work);
178 178
(...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after
702 Watcher *delegate) { 702 Watcher *delegate) {
703 return pump_libevent()->WatchFileDescriptor( 703 return pump_libevent()->WatchFileDescriptor(
704 fd, 704 fd,
705 persistent, 705 persistent,
706 static_cast<base::MessagePumpLibevent::Mode>(mode), 706 static_cast<base::MessagePumpLibevent::Mode>(mode),
707 controller, 707 controller,
708 delegate); 708 delegate);
709 } 709 }
710 710
711 #endif 711 #endif
OLDNEW
« no previous file with comments | « no previous file | base/process_util_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698