Add WriteFatalLog declarations to checks.h header

This adds a file,line version of this function (not yet committed) as
Chromium logging uses LogMessage(file, line, severity) and needs this
information to give better logs.

The two versions of this method will be implemented in webrtc_overrides/
and then committed to Chromium. At this point checks.cc will move its
anonymous-namespace version of this function (and be renamed) to
match this definition, but only define it when not building with
Chromium.

At this point WriteFatalLog will be using LogMessage(LOG_FATAL) to crash
in Chromium allowing us to upload better crash dumps and stacks to crash
reporting.

Bug: chromium:1216177
Change-Id: I3fd6a84cdfbb2552a5e628d46257bd7a00c9e6dc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/269288
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Peter Boström <pbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37646}
This commit is contained in:
Peter Boström 2022-07-22 15:31:02 -07:00 committed by WebRTC LUCI CQ
parent d481e2935a
commit e1c893530d

View File

@ -122,6 +122,13 @@ enum class CheckArgType : int8_t {
kCheckOp,
};
// These two functions are public so they can be overridden from
// webrtc_overrides in chromium.
RTC_NORETURN void WriteFatalLog(const char* file,
int line,
absl::string_view output);
RTC_NORETURN void WriteFatalLog(absl::string_view output);
#if RTC_CHECK_MSG_ENABLED
RTC_NORETURN RTC_EXPORT void FatalLog(const char* file,
int line,