summaryrefslogtreecommitdiffstats
path: root/base/win
diff options
context:
space:
mode:
authordcheng@chromium.org <dcheng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-03 16:00:12 +0000
committerdcheng@chromium.org <dcheng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-03 16:00:12 +0000
commite847b510732add9db92351c19a966957af995ee7 (patch)
tree7f67cf8dc6c0ab06287eacbb35b5db06664fdc8f /base/win
parent9d79382094111a0731053ed49551587c9cd4e58a (diff)
downloadchromium_src-e847b510732add9db92351c19a966957af995ee7.zip
chromium_src-e847b510732add9db92351c19a966957af995ee7.tar.gz
chromium_src-e847b510732add9db92351c19a966957af995ee7.tar.bz2
CHECK that we don't start watching an object with a NULL delegate.
Hopefully this finds the real culprit behind the crash. BUG=121086 TEST=none Review URL: http://codereview.chromium.org/9956071 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@130378 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/win')
-rw-r--r--base/win/object_watcher.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/base/win/object_watcher.cc b/base/win/object_watcher.cc
index 6b500cd..ebe596f 100644
--- a/base/win/object_watcher.cc
+++ b/base/win/object_watcher.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -24,6 +24,7 @@ ObjectWatcher::~ObjectWatcher() {
}
bool ObjectWatcher::StartWatching(HANDLE object, Delegate* delegate) {
+ CHECK(delegate);
if (wait_object_) {
NOTREACHED() << "Already watching an object";
return false;