Skip to content

Commit

Permalink
Use the authoritative upstream source for Breakpad, move to third_party
Browse files Browse the repository at this point in the history
Breakpad was being synced from a read-only mirror of a subdirectory
rather than the authoritative upstream source. This encouraged Chrome
developers to send patches against the read-only mirror. Those patches
couldn’t be committed and needed to be duplicated in the correct
repository. Once, a patch against the read-only mirror accidentally was
committed, and it broke mirroring.

This odd setup existed from the time of the git migration. Prior to
that, Breakpad was hosted in Subversion, and Chrome incidentally pulled
Breakpad’s src subdirectory rather than the entire trunk directory.
Because it wasn‘t easy to do the same thing with git, the read-only
mirror of src was created to avoid having to change lots of paths in
Chrome. But now I’m changing the paths.

This also moves Breakpad from the top-level breakpad directory in Chrome
to third_party/breakpad. It should have been there all along, but
Breakpad was one of the earliest dependencies added to Chrome, and at
that time, there was no firm policy on where to put Google-originated
external code.

Bug: 766917
TBR: pinkerton@chromium.org
Change-Id: I860a3e92b0327898ba73b8678af258a9020eeaaf
Reviewed-on: https://chromium-review.googlesource.com/677280
Commit-Queue: Mark Mentovai <mark@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#503925}
  • Loading branch information
markmentovai authored and Commit Bot committed Sep 23, 2017
1 parent a2aa7d8 commit 5b41612
Show file tree
Hide file tree
Showing 80 changed files with 1,169 additions and 1,162 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ vs-chromium-project.txt
/android_emulator_sdk
/ash/ash_unittests_run.xml
/base/base_unittests_run.xml
/breakpad/src/
# See build/.gitignore for entries covering src/build.
/buildtools
# The Chrome OS build creates a /c symlink due to http://crbug.com/54866.
Expand Down
2 changes: 1 addition & 1 deletion .gn
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ check_targets = [
"//ash/*",
"//base/*",
"//blink/*",
"//breakpad/*",
"//build/*",
"//cc/*",

Expand Down Expand Up @@ -135,6 +134,7 @@ check_targets = [
"//testing/*",

#"//third_party/*", # May not ever want this.
"//third_party/breakpad/*",
"//third_party/brotli/*",
"//third_party/hunspell/*",
"//third_party/leveldatabase/*",
Expand Down
46 changes: 24 additions & 22 deletions BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -364,10 +364,10 @@ group("gn_all") {

if (is_linux || is_android) {
deps += [
"//breakpad:breakpad_unittests",
"//breakpad:core-2-minidump",
"//breakpad:generate_test_dump",
"//breakpad:minidump-2-core",
"//third_party/breakpad:breakpad_unittests",
"//third_party/breakpad:core-2-minidump",
"//third_party/breakpad:generate_test_dump",
"//third_party/breakpad:minidump-2-core",
]
}

Expand Down Expand Up @@ -508,16 +508,16 @@ group("gn_all") {

if (is_android || (is_linux && !is_chromeos)) {
deps += [
"//breakpad:dump_syms($host_toolchain)",
"//breakpad:microdump_stackwalk($host_toolchain)",
"//breakpad:minidump_dump($host_toolchain)",
"//breakpad:minidump_stackwalk($host_toolchain)",
"//components/network_hints/browser",
"//content/public/app:browser",
"//content/public/app:child",
"//mojo/edk/test:mojo_public_system_perftests",
"//services/service_manager/public/cpp",
"//testing/gmock:gmock_main",
"//third_party/breakpad:dump_syms($host_toolchain)",
"//third_party/breakpad:microdump_stackwalk($host_toolchain)",
"//third_party/breakpad:minidump_dump($host_toolchain)",
"//third_party/breakpad:minidump_stackwalk($host_toolchain)",
]

if (!is_android) {
Expand Down Expand Up @@ -547,9 +547,9 @@ group("gn_all") {

if (is_mac) {
deps += [
"//breakpad:crash_inspector",
"//breakpad:dump_syms",
"//third_party/apple_sample_code",
"//third_party/breakpad:crash_inspector",
"//third_party/breakpad:dump_syms",
"//third_party/molokocacao",
]
deps -= [
Expand Down Expand Up @@ -585,7 +585,7 @@ group("gn_all") {
[ "//chrome/installer/mini_installer:next_version_mini_installer" ]
}
} else if (!is_android && !is_ios && !is_fuchsia) {
deps += [ "//breakpad:symupload($host_toolchain)" ]
deps += [ "//third_party/breakpad:symupload($host_toolchain)" ]
}

if (is_chromecast) {
Expand Down Expand Up @@ -813,13 +813,13 @@ if (is_chromeos) {
group("chromiumos_preflight") {
testonly = true
deps = [
"//breakpad:minidump_stackwalk($host_toolchain)",
"//chrome",
"//chrome/test/chromedriver",
"//media:media_unittests",
"//ppapi/examples/video_decode",
"//sandbox/linux:chrome_sandbox",
"//sandbox/linux:sandbox_linux_unittests",
"//third_party/breakpad:minidump_stackwalk($host_toolchain)",

# Blocked on https://github.com/catapult-project/catapult/issues/2297
#"//third_party/catapult/telemetry:bitmaptools",
Expand Down Expand Up @@ -913,12 +913,12 @@ if (!is_ios && !is_fuchsia) {

if (is_android) {
data_deps += [
"//breakpad:breakpad_unittests",
"//breakpad:dump_syms",
"//breakpad:microdump_stackwalk",
"//breakpad:minidump_dump",
"//breakpad:minidump_stackwalk",
"//breakpad:symupload",
"//third_party/breakpad:breakpad_unittests",
"//third_party/breakpad:dump_syms",
"//third_party/breakpad:microdump_stackwalk",
"//third_party/breakpad:minidump_dump",
"//third_party/breakpad:minidump_stackwalk",
"//third_party/breakpad:symupload",
"//tools/android/forwarder2",
]
}
Expand All @@ -928,15 +928,16 @@ if (!is_ios && !is_fuchsia) {
}

if (!is_win && !is_android) {
data_deps += [ "//breakpad:minidump_stackwalk($host_toolchain)" ]
data_deps +=
[ "//third_party/breakpad:minidump_stackwalk($host_toolchain)" ]
}

if (is_mac) {
data_deps += [ "//breakpad:dump_syms($host_toolchain)" ]
data_deps += [ "//third_party/breakpad:dump_syms($host_toolchain)" ]
}

if (is_linux) {
data_deps += [ "//breakpad:dump_syms($host_toolchain)" ]
data_deps += [ "//third_party/breakpad:dump_syms($host_toolchain)" ]
}

data = [
Expand Down Expand Up @@ -1054,7 +1055,8 @@ group("chromium_builder_perf") {
"//chrome/test:angle_perftests",
]
} else {
data_deps += [ "//breakpad:minidump_stackwalk($host_toolchain)" ]
data_deps +=
[ "//third_party/breakpad:minidump_stackwalk($host_toolchain)" ]
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ allowed_hosts = [
]

deps = {
'src/breakpad/src':
Var('chromium_git') + '/breakpad/breakpad/src.git' + '@' + '6b59fc07474c9338e7727c52a6d8a92010a105ad',
'src/third_party/breakpad/breakpad':
Var('chromium_git') + '/breakpad/breakpad.git' + '@' + '1c6d1613966eab5d77531e85f3b60c40124b43f0',

'src/buildtools':
Var('chromium_git') + '/chromium/buildtools.git' + '@' + Var('buildtools_revision'),
Expand Down Expand Up @@ -532,11 +532,11 @@ include_rules = [

# checkdeps.py shouldn't check include paths for files in these dirs:
skip_child_includes = [
'breakpad',
'native_client_sdk',
'out',
'skia',
'testing',
'third_party/breakpad/breakpad',
'v8',
'win8',
]
Expand Down
2 changes: 1 addition & 1 deletion PRESUBMIT.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@


_EXCLUDED_PATHS = (
r"^breakpad[\\\/].*",
r"^native_client_sdk[\\\/]src[\\\/]build_tools[\\\/]make_rules.py",
r"^native_client_sdk[\\\/]src[\\\/]build_tools[\\\/]make_simple.py",
r"^native_client_sdk[\\\/]src[\\\/]tools[\\\/].*.mk",
r"^net[\\\/]tools[\\\/]spdyshark[\\\/].*",
r"^skia[\\\/].*",
r"^third_party[\\\/](WebKit|blink)[\\\/].*",
r"^third_party[\\\/]breakpad[\\\/].*",
r"^v8[\\\/].*",
r".*MakeFile$",
r".+_autogen\.h$",
Expand Down
2 changes: 1 addition & 1 deletion base/debug/stack_trace_win.cc
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ bool InitializeSymbols() {
// we are using the Sym* functions. This is because breakpad does now
// share a lock with this function. See this related bug:
//
// http://code.google.com/p/google-breakpad/issues/detail?id=311
// https://crbug.com/google-breakpad/311
//
// This is a very unlikely edge case, and the current solution is to
// just ignore it.
Expand Down
2 changes: 1 addition & 1 deletion base/process/launch_mac.cc
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class PosixSpawnFileActions {
void RestoreDefaultExceptionHandler() {
// This function is tailored to remove the Breakpad exception handler.
// exception_mask matches s_exception_mask in
// breakpad/src/client/mac/handler/exception_handler.cc
// third_party/breakpad/breakpad/src/client/mac/handler/exception_handler.cc
const exception_mask_t exception_mask = EXC_MASK_BAD_ACCESS |
EXC_MASK_BAD_INSTRUCTION |
EXC_MASK_ARITHMETIC |
Expand Down
Loading

0 comments on commit 5b41612

Please sign in to comment.