|
|
DescriptionHandle RuntimeException in MemoryMonitorAndroid.getMemoryInfo
A RuntimeException can be thrown when we call
ActivityManager.getMemoryInfo() when the system is going to restart.
To avoid immediate crash, handle these exceptions gracefully.
BUG=668966
Committed: https://crrev.com/373df2959fa6c45a292701e655066fb5c1b0e7a9
Cr-Commit-Position: refs/heads/master@{#435568}
Patch Set 1 #
Total comments: 5
Patch Set 2 : Log exception #Messages
Total messages: 18 (9 generated)
The CQ bit was checked by bashi@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
bashi@chromium.org changed reviewers: + boliu@chromium.org, haraken@chromium.org
PTAL
https://codereview.chromium.org/2545673002/diff/1/content/public/android/java... File content/public/android/java/src/org/chromium/content/browser/MemoryMonitorAndroid.java (right): https://codereview.chromium.org/2545673002/diff/1/content/public/android/java... content/public/android/java/src/org/chromium/content/browser/MemoryMonitorAndroid.java:50: sMemoryInfo.totalMem = 1; 1 => 0 ? Is there any way for the caller side to understand that the failure has happened?
lgtm after haraken is happy https://codereview.chromium.org/2545673002/diff/1/content/public/android/java... File content/public/android/java/src/org/chromium/content/browser/MemoryMonitorAndroid.java (right): https://codereview.chromium.org/2545673002/diff/1/content/public/android/java... content/public/android/java/src/org/chromium/content/browser/MemoryMonitorAndroid.java:46: Log.e(TAG, "Failed to get memory info due to a runtime exception"); can pass the exception as the last arg
https://codereview.chromium.org/2545673002/diff/1/content/public/android/java... File content/public/android/java/src/org/chromium/content/browser/MemoryMonitorAndroid.java (right): https://codereview.chromium.org/2545673002/diff/1/content/public/android/java... content/public/android/java/src/org/chromium/content/browser/MemoryMonitorAndroid.java:46: Log.e(TAG, "Failed to get memory info due to a runtime exception"); On 2016/12/01 01:54:45, boliu wrote: > can pass the exception as the last arg will do. https://codereview.chromium.org/2545673002/diff/1/content/public/android/java... content/public/android/java/src/org/chromium/content/browser/MemoryMonitorAndroid.java:50: sMemoryInfo.totalMem = 1; On 2016/12/01 01:46:42, haraken wrote: > > 1 => 0 ? Why? As I wrote they are arbitrary. > > Is there any way for the caller side to understand that the failure has > happened? Probably no. I searched internal repo but there is no clue.
On 2016/12/01 02:02:18, bashi1 wrote: > https://codereview.chromium.org/2545673002/diff/1/content/public/android/java... > File > content/public/android/java/src/org/chromium/content/browser/MemoryMonitorAndroid.java > (right): > > https://codereview.chromium.org/2545673002/diff/1/content/public/android/java... > content/public/android/java/src/org/chromium/content/browser/MemoryMonitorAndroid.java:46: > Log.e(TAG, "Failed to get memory info due to a runtime exception"); > On 2016/12/01 01:54:45, boliu wrote: > > can pass the exception as the last arg > > will do. > > https://codereview.chromium.org/2545673002/diff/1/content/public/android/java... > content/public/android/java/src/org/chromium/content/browser/MemoryMonitorAndroid.java:50: > sMemoryInfo.totalMem = 1; > On 2016/12/01 01:46:42, haraken wrote: > > > > 1 => 0 ? > Why? As I wrote they are arbitrary. > > > > Is there any way for the caller side to understand that the failure has > > happened? > Probably no. I searched internal repo but there is no clue. ok, LGTM
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
https://codereview.chromium.org/2545673002/diff/1/content/public/android/java... File content/public/android/java/src/org/chromium/content/browser/MemoryMonitorAndroid.java (right): https://codereview.chromium.org/2545673002/diff/1/content/public/android/java... content/public/android/java/src/org/chromium/content/browser/MemoryMonitorAndroid.java:46: Log.e(TAG, "Failed to get memory info due to a runtime exception"); On 2016/12/01 02:02:18, bashi1 wrote: > On 2016/12/01 01:54:45, boliu wrote: > > can pass the exception as the last arg > > will do. Done.
The CQ bit was checked by bashi@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from haraken@chromium.org, boliu@chromium.org Link to the patchset: https://codereview.chromium.org/2545673002/#ps20001 (title: "Log exception")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch. Bot data: {"patchset_id": 20001, "attempt_start_ts": 1480573243862840, "parent_rev": "8664ebd21eef652904dc994620437061adaac096", "commit_rev": "fa0c68cf494bf598c748384ef5d54386f7eda67f"}
Message was sent while issue was closed.
Committed patchset #2 (id:20001)
Message was sent while issue was closed.
Description was changed from ========== Handle RuntimeException in MemoryMonitorAndroid.getMemoryInfo A RuntimeException can be thrown when we call ActivityManager.getMemoryInfo() when the system is going to restart. To avoid immediate crash, handle these exceptions gracefully. BUG=668966 ========== to ========== Handle RuntimeException in MemoryMonitorAndroid.getMemoryInfo A RuntimeException can be thrown when we call ActivityManager.getMemoryInfo() when the system is going to restart. To avoid immediate crash, handle these exceptions gracefully. BUG=668966 Committed: https://crrev.com/373df2959fa6c45a292701e655066fb5c1b0e7a9 Cr-Commit-Position: refs/heads/master@{#435568} ==========
Message was sent while issue was closed.
Patchset 2 (id:??) landed as https://crrev.com/373df2959fa6c45a292701e655066fb5c1b0e7a9 Cr-Commit-Position: refs/heads/master@{#435568} |