Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1042)

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java

Issue 1490483002: Ignore failure to find upload service on KK and below. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: move uma Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java b/chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java
index 502f24ce096deaff153c37cfc2969c425f86321b..ac815a965f024440c5d466473f265ca51529da58 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java
@@ -10,6 +10,7 @@ import android.content.Intent;
import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.Color;
+import android.os.Build;
import android.os.Handler;
import android.os.Message;
import android.provider.Browser;
@@ -2429,15 +2430,24 @@ public class Tab implements ViewGroup.OnHierarchyChangeListener,
if (mTabUma != null) mTabUma.onRendererCrashed();
- // Update the most recent minidump file with the logcat. Doing this asynchronously
- // adds a race condition in the case of multiple simultaneously renderer crashses
- // but because the data will be the same for all of them it is innocuous. We can
- // attempt to do this regardless of whether it was a foreground tab in the event
- // that it's a real crash and not just android killing the tab.
- Context context = getApplicationContext();
- Intent intent = MinidumpUploadService.createFindAndUploadLastCrashIntent(context);
- context.startService(intent);
- RecordUserAction.record("MobileBreakpadUploadAttempt");
+ try {
+ // Update the most recent minidump file with the logcat. Doing this asynchronously
+ // adds a race condition in the case of multiple simultaneously renderer crashses
+ // but because the data will be the same for all of them it is innocuous. We can
+ // attempt to do this regardless of whether it was a foreground tab in the event
+ // that it's a real crash and not just android killing the tab.
+ Context context = getApplicationContext();
+ Intent intent = MinidumpUploadService.createFindAndUploadLastCrashIntent(context);
+ context.startService(intent);
+ RecordUserAction.record("MobileBreakpadUploadAttempt");
+ } catch (SecurityException e) {
+ // For KitKat and below, there was a framework bug which cause us to not be able to
+ // find our own crash uploading service. Ignore a SecurityException here on older
+ // OS versions since the crash will eventually get uploaded on next start. crbug/542533
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
+ throw e;
+ }
+ }
}
/**
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698