forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move DumpProcessWithoutCrash to base, so we can use it from net and c…
…ontent BUG=none R=mark@chromium.org TBR=wez@chromium.org Review URL: https://codereview.chromium.org/99523009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@241589 0039d316-1c4b-4281-b951-d872f2087c98
- Loading branch information
jochen@chromium.org
committed
Dec 18, 2013
1 parent
b8b2dbe
commit 5a8d4ce
Showing
20 changed files
with
88 additions
and
124 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// Copyright 2013 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. | ||
|
||
#include "base/debug/dump_without_crashing.h" | ||
|
||
#include "base/logging.h" | ||
|
||
namespace { | ||
|
||
// Pointer to the function that's called by DumpWithoutCrashing() to dump the | ||
// process's memory. | ||
void (CDECL *dump_without_crashing_function_)() = NULL; | ||
|
||
} // namespace | ||
|
||
namespace base { | ||
|
||
namespace debug { | ||
|
||
void DumpWithoutCrashing() { | ||
if (dump_without_crashing_function_) | ||
(*dump_without_crashing_function_)(); | ||
} | ||
|
||
void SetDumpWithoutCrashingFunction(void (CDECL *function)()) { | ||
dump_without_crashing_function_ = function; | ||
} | ||
|
||
} // namespace debug | ||
|
||
} // namespace base |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// Copyright 2013 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. | ||
|
||
#ifndef BASE_DEBUG_DUMP_WITHOUT_CRASHING_H_ | ||
#define BASE_DEBUG_DUMP_WITHOUT_CRASHING_H_ | ||
|
||
#include "base/base_export.h" | ||
#include "base/compiler_specific.h" | ||
#include "build/build_config.h" | ||
|
||
namespace base { | ||
|
||
namespace debug { | ||
|
||
// Handler to silently dump the current process without crashing. | ||
BASE_EXPORT void DumpWithoutCrashing(); | ||
|
||
// Sets a function that'll be invoked to dump the current process when | ||
// DumpWithoutCrashing() is called. | ||
BASE_EXPORT void SetDumpWithoutCrashingFunction(void (CDECL *function)()); | ||
|
||
} // namespace debug | ||
|
||
} // namespace base | ||
|
||
#endif // BASE_DEBUG_DUMP_WITHOUT_CRASHING_H_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.