Commit 80ce83bc authored by bulach@chromium.org's avatar bulach@chromium.org

ThreadWatcher: disarm startup watchdog even when stop is called.

StopWatchingAll() can be called before InitializeAndStartWatching
is called. Before bailing out, disarm the startup watchdog.

BUG=

Review URL: https://codereview.chromium.org/341713003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@277968 0039d316-1c4b-4281-b951-d872f2087c98
parent 24c17f54
......@@ -657,6 +657,12 @@ void ThreadWatcherList::InitializeAndStartWatching(
const CrashOnHangThreadMap& crash_on_hang_threads) {
DCHECK(WatchDogThread::CurrentlyOnWatchDogThread());
// Disarm the startup timebomb, even if stop has been called.
BrowserThread::PostTask(
BrowserThread::UI,
FROM_HERE,
base::Bind(&StartupTimeBomb::DisarmStartupTimeBomb));
// This method is deferred in relationship to its StopWatchingAll()
// counterpart. If a previous initialization has already happened, or if
// stop has been called, there's nothing left to do here.
......@@ -666,11 +672,6 @@ void ThreadWatcherList::InitializeAndStartWatching(
ThreadWatcherList* thread_watcher_list = new ThreadWatcherList();
CHECK(thread_watcher_list);
BrowserThread::PostTask(
BrowserThread::UI,
FROM_HERE,
base::Bind(&StartupTimeBomb::DisarmStartupTimeBomb));
const base::TimeDelta kSleepTime =
base::TimeDelta::FromSeconds(kSleepSeconds);
const base::TimeDelta kUnresponsiveTime =
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment