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

Side by Side Diff: components/scheduler/base/work_queue.cc

Issue 1700853002: avoid 'may be used uninitialized' warnings in work_queue.cc (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "components/scheduler/base/work_queue.h" 5 #include "components/scheduler/base/work_queue.h"
6 6
7 #include "components/scheduler/base/work_queue_sets.h" 7 #include "components/scheduler/base/work_queue_sets.h"
8 8
9 namespace scheduler { 9 namespace scheduler {
10 namespace internal { 10 namespace internal {
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 work_queue_sets_ = work_queue_sets; 84 work_queue_sets_ = work_queue_sets;
85 } 85 }
86 86
87 void WorkQueue::AssignSetIndex(size_t work_queue_set_index) { 87 void WorkQueue::AssignSetIndex(size_t work_queue_set_index) {
88 work_queue_set_index_ = work_queue_set_index; 88 work_queue_set_index_ = work_queue_set_index;
89 } 89 }
90 90
91 bool WorkQueue::ShouldRunBefore(const WorkQueue* other_queue) const { 91 bool WorkQueue::ShouldRunBefore(const WorkQueue* other_queue) const {
92 DCHECK(!work_queue_.empty()); 92 DCHECK(!work_queue_.empty());
93 DCHECK(!other_queue->work_queue_.empty()); 93 DCHECK(!other_queue->work_queue_.empty());
94 EnqueueOrder enqueue_order; 94 EnqueueOrder enqueue_order = 0;
95 EnqueueOrder other_enqueue_order; 95 EnqueueOrder other_enqueue_order = 0;
96 bool have_task = GetFrontTaskEnqueueOrder(&enqueue_order); 96 bool have_task = GetFrontTaskEnqueueOrder(&enqueue_order);
97 bool have_other_task = 97 bool have_other_task =
98 other_queue->GetFrontTaskEnqueueOrder(&other_enqueue_order); 98 other_queue->GetFrontTaskEnqueueOrder(&other_enqueue_order);
99 DCHECK(have_task); 99 DCHECK(have_task);
100 DCHECK(have_other_task); 100 DCHECK(have_other_task);
101 return enqueue_order < other_enqueue_order; 101 return enqueue_order < other_enqueue_order;
102 } 102 }
103 103
104 } // namespace internal 104 } // namespace internal
105 } // namespace scheduler 105 } // namespace scheduler
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698