Commit 94d37b86 authored by Varun Khaneja's avatar Varun Khaneja Committed by Commit Bot

Add CHECKs to identify what condition is causing the crashes

crash/5186130e462b3265 suggests that the crashes reported in the linked
bugs are happening when result_status != RESULT_STATUS_SUCCESS.
This can be due to time out or internal error.

Adding CHECKs for both of those conditions explicitly to understand
what's causing that.

Bug: 893110,889972
Change-Id: I51598b9642a09b31ad700bc83829636d2787fccd
Reviewed-on: https://chromium-review.googlesource.com/c/1343521Reviewed-by: default avatarDaniel Rubery <drubery@chromium.org>
Commit-Queue: Varun Khaneja <vakh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#609728}
parent dfc286ca
......@@ -124,13 +124,16 @@ void JNI_SafeBrowsingApiBridge_OnUrlCheckDone(
callback_id));
if (result_status != RESULT_STATUS_SUCCESS) {
CHECK(callback); // Remove after fixing crbug.com/889972
CHECK(!callback->is_null()); // Remove after fixing crbug.com/889972
if (result_status == RESULT_STATUS_TIMEOUT) {
CHECK(callback); // Remove after fixing crbug.com/889972
CHECK(!callback->is_null()); // Remove after fixing crbug.com/889972
ReportUmaResult(UMA_STATUS_TIMEOUT);
VLOG(1) << "Safe browsing API call timed-out";
} else {
CHECK(callback); // Remove after fixing crbug.com/889972
CHECK(!callback->is_null()); // Remove after fixing crbug.com/889972
DCHECK_EQ(result_status, RESULT_STATUS_INTERNAL_ERROR);
ReportUmaResult(UMA_STATUS_INTERNAL_ERROR);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment