0

Revert of Reland Enable crashpad for Mac. (patchset id:1 of https://codereview.chromium.org/2820453003/ )

Reason for revert:
Sorry, looks like this is still causing some test failures:
https://luci-logdog.appspot.com/v/?s=chromium%2Fbb%2Fchromium.mac%2FMac10.10_Tests%2F16868%2F%2B%2Frecipes%2Fsteps%2Fheadless_browsertests_on_Mac-10.10%2F0%2Flogs%2FCrashReporterTest.GenerateMinidump%2F0
https://uberchromegw.corp.google.com/i/chromium.mac/builders/Mac10.10%20Tests/builds/16868

Original issue's description:
> Reland Enable crashpad for Mac.
> -- Add :mac_helpers dependendency to headless_lib
>
>
>
> Original reason for revert: Reason for revert:
> mac_chromium10.10_rel_ng buildbot failing in browsertests
> https://luci-logdog.appspot.com/v/?s=chromium%2Fbb%2Fchromium.mac%2FMac10.10_Tests%2F16541%2F%2B%2Frecipes%2Fsteps%2Fheadless_browsertests_on_Mac-10.10%2F0%2Flogs%2FCrashReporterTest.GenerateMinidump%2F0
>
>
> This follows the same logic as using breakpad in linux with flags --enable_crash-reporter and --crash-dumps-dir folders.
>
> For headless_shell target, we need to include the Helper crashpad_handler in the build. For --headless, this is already available in the framework bundle.
>
> BUG=687407
>
> Review-Url: https://codereview.chromium.org/2816593006
> Cr-Commit-Position: refs/heads/master@{#464289}
> Committed: ecb2ad2495
>
> patch from issue 2816593006 at patchset 60001 (http://crrev.com/2816593006#ps60001)
>
> Review-Url: https://codereview.chromium.org/2820453003
> Cr-Commit-Position: refs/heads/master@{#465869}
> Committed: df51c3e481

TBR=skyostil@chromium.org,dvallet@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=687407

Review-Url: https://codereview.chromium.org/2826193003
Cr-Commit-Position: refs/heads/master@{#465895}
This commit is contained in:
aboxhall
2017-04-19 21:05:03 -07:00
committed by Commit bot
parent 954977d31f
commit 70a619651d
3 changed files with 10 additions and 36 deletions

@ -342,9 +342,7 @@ static_library("headless_lib") {
"//url",
]
if (is_mac) {
deps += [ ":mac_helpers" ]
} else {
if (!is_mac) {
deps += [ "//ui/aura" ]
}
@ -434,22 +432,6 @@ repack("headless_browser_tests_pak") {
]
}
if (is_mac) {
copy("mac_helpers") {
sources = [
"$root_out_dir/crashpad_handler",
]
deps = [
"//third_party/crashpad/crashpad/handler:crashpad_handler",
]
outputs = [
"$root_out_dir/Helpers/{{source_file_part}}",
]
}
}
test("headless_browsertests") {
sources = [
"lib/embedder_mojo_browsertest.cc",

@ -717,13 +717,12 @@ class CrashReporterTest : public HeadlessBrowserTest,
base::FilePath crash_dumps_dir_;
};
// TODO(skyostil): Minidump generation currently is only supported on Linux and
// Mac.
#if defined(HEADLESS_USE_BREAKPAD) || defined(OS_MACOSX)
// TODO(skyostil): Minidump generation currently is only supported on Linux.
#if defined(HEADLESS_USE_BREAKPAD)
#define MAYBE_GenerateMinidump GenerateMinidump
#else
#define MAYBE_GenerateMinidump DISABLED_GenerateMinidump
#endif // defined(HEADLESS_USE_BREAKPAD) || defined(OS_MACOSX)
#endif // defined(HEADLESS_USE_BREAKPAD)
IN_PROC_BROWSER_TEST_F(CrashReporterTest, MAYBE_GenerateMinidump) {
// Navigates a tab to chrome://crash and checks that a minidump is generated.
// Note that we only test renderer crashes here -- browser crashes need to be
@ -745,10 +744,6 @@ IN_PROC_BROWSER_TEST_F(CrashReporterTest, MAYBE_GenerateMinidump) {
// Check that one minidump got created.
{
#if defined(OS_MACOSX)
// Mac outputs dumps in the 'completed' directory.
crash_dumps_dir_ = crash_dumps_dir_.Append("completed");
#endif
base::ThreadRestrictions::SetIOAllowed(true);
base::FileEnumerator it(crash_dumps_dir_, /* recursive */ false,
base::FileEnumerator::FILES);

@ -33,10 +33,6 @@
#include "headless/embedded_resource_pak.h"
#endif
#if defined(OS_MACOSX)
#include "components/crash/content/app/crashpad.h"
#endif
namespace headless {
namespace {
// Keep in sync with content/common/content_constants_internal.h.
@ -163,17 +159,16 @@ void HeadlessContentMainDelegate::InitCrashReporter(
g_headless_crash_client.Pointer()->set_crash_dumps_dir(
browser_->options()->crash_dumps_dir);
#if defined(HEADLESS_USE_BREAKPAD)
#if !defined(OS_MACOSX)
if (!browser_->options()->enable_crash_reporter) {
DCHECK(!breakpad::IsCrashReporterEnabled());
return;
}
#if defined(HEADLESS_USE_BREAKPAD)
if (process_type != switches::kZygoteProcess)
breakpad::InitCrashReporter(process_type);
#elif defined(OS_MACOSX)
const bool browser_process = process_type.empty();
crash_reporter::InitializeCrashpad(browser_process, process_type);
#endif // defined(HEADLESS_USE_BREAKPAD)
#endif // !defined(OS_MACOSX)
}
void HeadlessContentMainDelegate::PreSandboxStartup() {
@ -186,8 +181,10 @@ void HeadlessContentMainDelegate::PreSandboxStartup() {
#else
if (command_line.HasSwitch(switches::kEnableLogging))
InitLogging(command_line);
#endif // defined(OS_WIN)
#endif
#if !defined(OS_MACOSX)
InitCrashReporter(command_line);
#endif
InitializeResourceBundle();
}