Skip to content
This repository has been archived by the owner on Apr 10, 2024. It is now read-only.

Commit

Permalink
Bug 720092 - java.lang.IndexOutOfBoundsException: getChars (0 ... 881…
Browse files Browse the repository at this point in the history
…68) ends beyond length 0. We do not know why this is happening yet. This patch catches the throw and logs what values we have for start and end. r=alexp
  • Loading branch information
Doug Turner committed Jan 31, 2012
1 parent 7da3496 commit ecc3d5e
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion mobile/android/base/GeckoInputConnection.java
Expand Up @@ -206,8 +206,16 @@ public ExtractedText getExtractedText(ExtractedTextRequest req, int flags) {
extract.selectionEnd = b; extract.selectionEnd = b;


extract.startOffset = 0; extract.startOffset = 0;
extract.text = content.toString();


try {
extract.text = content.toString();
} catch (IndexOutOfBoundsException iob) {
Log.d(LOGTAG,
"IndexOutOfBoundsException thrown from getExtractedText(). start: " +
Selection.getSelectionStart(content) +
" end: " + Selection.getSelectionEnd(content));
return null;
}
return extract; return extract;
} }


Expand Down

0 comments on commit ecc3d5e

Please sign in to comment.