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

Unified Diff: content/public/android/java/src/org/chromium/content/browser/TracingControllerAndroid.java

Issue 2809043005: Work around GPU process crashing in TracingControllerAndroid
Patch Set: Update error message to include intent data Created 3 years, 8 months 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: content/public/android/java/src/org/chromium/content/browser/TracingControllerAndroid.java
diff --git a/content/public/android/java/src/org/chromium/content/browser/TracingControllerAndroid.java b/content/public/android/java/src/org/chromium/content/browser/TracingControllerAndroid.java
index 43183631f4fa30a593d38f810f5db03b14645881..e12e9094c8aa6c42142e04e3cab74c5db153cba4 100644
--- a/content/public/android/java/src/org/chromium/content/browser/TracingControllerAndroid.java
+++ b/content/public/android/java/src/org/chromium/content/browser/TracingControllerAndroid.java
@@ -278,28 +278,33 @@ public class TracingControllerAndroid {
class TracingBroadcastReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
- if (intent.getAction().endsWith(ACTION_START)) {
- String categories = intent.getStringExtra(CATEGORIES_EXTRA);
- if (TextUtils.isEmpty(categories)) {
- categories = nativeGetDefaultCategories();
+ try {
+ if (intent.getAction().endsWith(ACTION_START)) {
+ String categories = intent.getStringExtra(CATEGORIES_EXTRA);
+ if (TextUtils.isEmpty(categories)) {
+ categories = nativeGetDefaultCategories();
+ } else {
+ categories = categories.replaceFirst(DEFAULT_CHROME_CATEGORIES_PLACE_HOLDER,
+ nativeGetDefaultCategories());
+ }
+ String traceOptions = intent.getStringExtra(RECORD_CONTINUOUSLY_EXTRA) == null
+ ? "record-until-full"
+ : "record-continuously";
+ String filename = intent.getStringExtra(FILE_EXTRA);
+ if (filename != null) {
+ startTracing(filename, true, categories, traceOptions);
+ } else {
+ startTracing(true, categories, traceOptions);
+ }
+ } else if (intent.getAction().endsWith(ACTION_STOP)) {
+ stopTracing();
+ } else if (intent.getAction().endsWith(ACTION_LIST_CATEGORIES)) {
+ getCategoryGroups();
} else {
- categories = categories.replaceFirst(
- DEFAULT_CHROME_CATEGORIES_PLACE_HOLDER, nativeGetDefaultCategories());
+ Log.e(TAG, "Unexpected intent: %s", intent);
}
- String traceOptions = intent.getStringExtra(RECORD_CONTINUOUSLY_EXTRA) == null
- ? "record-until-full" : "record-continuously";
- String filename = intent.getStringExtra(FILE_EXTRA);
- if (filename != null) {
- startTracing(filename, true, categories, traceOptions);
- } else {
- startTracing(true, categories, traceOptions);
- }
- } else if (intent.getAction().endsWith(ACTION_STOP)) {
- stopTracing();
- } else if (intent.getAction().endsWith(ACTION_LIST_CATEGORIES)) {
- getCategoryGroups();
- } else {
- Log.e(TAG, "Unexpected intent: %s", intent);
+ } catch (java.lang.UnsatisfiedLinkError e) {
+ Log.w(TAG, "onReceive(action=%s) failed: %s", intent.getAction(), 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