Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

- Disable PC adjustment in the backend for libunwindstack ([#839](https://github.com/getsentry/sentry-native/pull/839))
- Crashpad backend allows inspection and enrichment of the crash event in the on_crash/before_send hooks ([#843](https://github.com/getsentry/sentry-native/pull/843))
- Add http-proxy support to the `crashpad_handler` ([#847](https://github.com/getsentry/sentry-native/pull/847), [crashpad#86](https://github.com/getsentry/crashpad/pull/86))

**Internal**:

Expand Down
22 changes: 16 additions & 6 deletions src/backends/sentry_backend_crashpad.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -319,15 +319,25 @@ crashpad_backend_startup(
// `sentry_init` will persist the upload flag.
data->db = crashpad::CrashReportDatabase::Initialize(database).release();

bool success;
crashpad::CrashpadClient client;
char *minidump_url
= sentry__dsn_get_minidump_url(options->dsn, options->user_agent);
SENTRY_TRACEF("using minidump url \"%s\"", minidump_url);
std::string url = minidump_url ? std::string(minidump_url) : std::string();
sentry_free(minidump_url);
bool success = client.StartHandler(handler, database, database, url,
annotations, arguments, /* restartable */ true,
/* asynchronous_start */ false, attachments);
if (minidump_url) {
SENTRY_TRACEF("using minidump URL \"%s\"", minidump_url);
success = client.StartHandler(handler, database, database, minidump_url,
options->http_proxy ? options->http_proxy : "", annotations,
arguments,
/* restartable */ true,
/* asynchronous_start */ false, attachments);
sentry_free(minidump_url);
} else {
SENTRY_WARN(
"failed to construct minidump URL (check DSN or user-agent)");
delete data->db;
data->db = nullptr;
return 1;
}

#ifdef CRASHPAD_WER_ENABLED
sentry_path_t *handler_dir = sentry__path_dir(absolute_handler_path);
Expand Down