Make console.error report to crash reporter for chrome://media-app.
Wraps calls to the crash reporter in reportCrashError that is called whenever there is a console.error, in doing so we need to build up the error from any number of arguments since console.error can be called with (...*). Also adds this for onerror & unhandledrejection handlers in trusted context & tests. I think there might be some errors in the trusted context we aren't picking up on because I don't think we guarantee the app initializes before these errors occur and so the error reporter (in index.ts) wouldn't be initialized. This cl makes console.error use crashReportPrivate.reportError() so we can keep track of such errors. This may lead to launch code such as LaunchWithDirectory not erroring which may be related to b/160104958. Bugs: b/156205603 Change-Id: I404e870a9786ebe5371409c963a5140381d59126 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2301652Reviewed-by:Trent Apted <tapted@chromium.org> Reviewed-by:
Devlin <rdevlin.cronin@chromium.org> Commit-Queue: David Lei <dlei@google.com> Cr-Commit-Position: refs/heads/master@{#790636}
Showing
Please register or sign in to comment