mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-02 01:48:05 +00:00
Bug 692185 - Flush PrintWriter prior to extracting printed string; r=blassey
Not flushing the PrintWriter might cause data to get left in the PrintWriter's internal buffers, and not get written into the underlying StringWriter. This might explain why the stack trace does not get written out to the crash report.
This commit is contained in:
parent
a9396bac02
commit
8b295cc6ce
@ -358,7 +358,9 @@ abstract public class GeckoApp
|
||||
} catch (Exception e) {
|
||||
Log.e(LOG_FILE_NAME, "top level exception", e);
|
||||
StringWriter sw = new StringWriter();
|
||||
e.printStackTrace(new PrintWriter(sw));
|
||||
PrintWriter pw = new PrintWriter(sw);
|
||||
e.printStackTrace(pw);
|
||||
pw.flush();
|
||||
GeckoAppShell.reportJavaCrash(sw.toString());
|
||||
}
|
||||
// resetting this is kinda pointless, but oh well
|
||||
|
Loading…
Reference in New Issue
Block a user