Port PluginObject fix downstream. See http://trac.webkit.org/changeset/61415/ for...
[chromium-blink-merge.git] / base / debug_util.cc
blob21f5b70fdced615c4b63a099c11f26b02c5f8023
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "base/debug_util.h"
7 #include "base/platform_thread.h"
9 bool DebugUtil::suppress_dialogs_ = false;
11 bool DebugUtil::WaitForDebugger(int wait_seconds, bool silent) {
12 for (int i = 0; i < wait_seconds * 10; ++i) {
13 if (BeingDebugged()) {
14 if (!silent)
15 BreakDebugger();
16 return true;
18 PlatformThread::Sleep(100);
20 return false;
23 const void *const *StackTrace::Addresses(size_t* count) {
24 *count = count_;
25 if (count_)
26 return trace_;
27 return NULL;