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

Unified Diff: base/process_win.cc

Issue 149202: Don't call SetPriorityClass when process_ is 0. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 5 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/process_win.cc
===================================================================
--- base/process_win.cc (revision 19931)
+++ base/process_win.cc (working copy)
@@ -23,7 +23,8 @@
}
bool Process::IsProcessBackgrounded() const {
- DCHECK(process_);
+ if (!process_)
+ return false; // Failure case.
DWORD priority = GetPriorityClass(process_);
if (priority == 0)
return false; // Failure case.
@@ -31,7 +32,8 @@
}
bool Process::SetProcessBackgrounded(bool value) {
- DCHECK(process_);
+ if (!process_)
+ return false;
DWORD priority = value ? BELOW_NORMAL_PRIORITY_CLASS : NORMAL_PRIORITY_CLASS;
return (SetPriorityClass(process_, priority) != 0);
}
« 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