• David's avatar
    Make console.error report to crash reporter for chrome://media-app. · ce2d1dc1
    David authored
    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: default avatarTrent Apted <tapted@chromium.org>
    Reviewed-by: default avatarDevlin <rdevlin.cronin@chromium.org>
    Commit-Queue: David Lei <dlei@google.com>
    Cr-Commit-Position: refs/heads/master@{#790636}
    ce2d1dc1
BUILD.gn 1.66 KB