| Index: chrome/android/java/src/org/chromium/chrome/browser/util/IntentUtils.java
|
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/util/IntentUtils.java b/chrome/android/java/src/org/chromium/chrome/browser/util/IntentUtils.java
|
| index 033beade4ba8411efb8caa105324db5fbfd56572..3dffaf2bafcda5e7c5ba61545861da6c89435420 100644
|
| --- a/chrome/android/java/src/org/chromium/chrome/browser/util/IntentUtils.java
|
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/util/IntentUtils.java
|
| @@ -349,4 +349,20 @@ public class IntentUtils {
|
| public static boolean isIntentTooLarge(Intent intent) {
|
| return getParceledIntentSize(intent) > MAX_INTENT_SIZE_THRESHOLD;
|
| }
|
| +
|
| + /**
|
| + * Given an exception, check whether it wrapped a {@link TransactionTooLargeException}. If it
|
| + * does, then log the underlying error. If not, throw the original exception again.
|
| + *
|
| + * @param e The caught RuntimeException.
|
| + * @param intent The intent that triggered the RuntimeException to be thrown.
|
| + */
|
| + public static void logTransactionTooLargeOrRethrow(RuntimeException e, Intent intent) {
|
| + // See http://crbug.com/369574.
|
| + if (e.getCause() instanceof TransactionTooLargeException) {
|
| + Log.e(TAG, "Could not resolve Activity for intent " + intent.toString(), e);
|
| + } else {
|
| + throw e;
|
| + }
|
| + }
|
| }
|
|
|