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

Unified Diff: android_webview/java/src/org/chromium/android_webview/AwBrowserProcess.java

Issue 2862353003: [Crash Reporting] Fix a race between uploading and appending logcat data. (Closed)
Patch Set: Rebase Created 3 years, 7 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 | android_webview/java/src/org/chromium/android_webview/crash/AwMinidumpUploaderDelegate.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/java/src/org/chromium/android_webview/AwBrowserProcess.java
diff --git a/android_webview/java/src/org/chromium/android_webview/AwBrowserProcess.java b/android_webview/java/src/org/chromium/android_webview/AwBrowserProcess.java
index 64b7c6fc210b41fafd6bb68e92d2d23e182bbe30..cbd29c20cd130b33f1fcf398b04e707ba2306309 100644
--- a/android_webview/java/src/org/chromium/android_webview/AwBrowserProcess.java
+++ b/android_webview/java/src/org/chromium/android_webview/AwBrowserProcess.java
@@ -48,8 +48,6 @@ public abstract class AwBrowserProcess {
private static RandomAccessFile sLockFile;
private static FileLock sExclusiveFileLock;
- private static final int MAX_MINIDUMP_UPLOAD_TRIES = 3;
-
/**
* Loads the native library, and performs basic static construction of objects needed
* to run webview in this process. Does not create threads; safe to call from zygote.
@@ -165,8 +163,11 @@ public abstract class AwBrowserProcess {
final File crashSpoolDir = new File(appContext.getCacheDir().getPath(), "WebView");
if (!crashSpoolDir.isDirectory()) return null;
final CrashFileManager crashFileManager = new CrashFileManager(crashSpoolDir);
- final File[] minidumpFiles =
- crashFileManager.getAllMinidumpFiles(MAX_MINIDUMP_UPLOAD_TRIES);
+
+ // The lifecycle of a minidump in the app directory is very simple: foo.dmpNNNNN --
+ // where NNNNN is a Process ID (PID) -- gets created, and is either deleted or
+ // copied over to the shared crash directory for all WebView-using apps.
+ final File[] minidumpFiles = crashFileManager.getMinidumpsSansLogcat();
if (minidumpFiles.length == 0) return null;
// Delete the minidumps if the user doesn't allow crash data uploading.
« no previous file with comments | « no previous file | android_webview/java/src/org/chromium/android_webview/crash/AwMinidumpUploaderDelegate.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698