Closed Bug 844913 Opened 8 years ago Closed 8 years ago

SwiftKey crashes on Gingerbread when using background IME thread

Categories

(Firefox for Android :: Keyboards and IME, defect)

ARM
Android
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 22
Tracking Status
firefox20 --- unaffected
firefox21 --- fixed
firefox22 --- fixed

People

(Reporter: jchen, Assigned: jchen)

References

Details

(Keywords: regression)

Attachments

(1 file)

I noticed SwiftKey crashes as soon as we switch from UI thread to the background IME thread, but I've only seen it on Gingerbread.
Is it related to bug 844020?
(In reply to Scoobidiver from comment #1)
> Is it related to bug 844020?

I don't think so. That bug only happens in the Awesomebar and this bug only happens in content.
The problem is we did not null-check results from GeckoInputConnection.getEditable(), because it used to never return null. Now that we have an IC thread, it can return null if we are running on the UI thread.

This patch adds the necessary null-checks. I went over each case, and determined we can safely ignore the call when getEditable() returns null.

BaseInputConnection ignores the call if getEditable() returns null, so this patch matches Android's behavior as well.
Attachment #718016 - Flags: review?(cpeterson)
Comment on attachment 718016 [details] [diff] [review]
Null-check getEditable() results in GeckoInputConnection (v1)

Review of attachment 718016 [details] [diff] [review]:
-----------------------------------------------------------------

LGTM
Attachment #718016 - Flags: review?(cpeterson) → review+
https://hg.mozilla.org/mozilla-central/rev/c862b0b9a898
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Comment on attachment 718016 [details] [diff] [review]
Null-check getEditable() results in GeckoInputConnection (v1)

[Approval Request Comment]

Bug caused by (feature/regressing bug #): Bug 835906

User impact if declined: Crash in SwiftKey not caught by crash reporter

Testing completed (on m-c, etc.): locally; m-c

Risk to taking this patch (and alternatives if risky): Very small; patch only avoids crash

String or UUID changes made by this patch: None
Attachment #718016 - Flags: approval-mozilla-aurora?
Keywords: regression
Comment on attachment 718016 [details] [diff] [review]
Null-check getEditable() results in GeckoInputConnection (v1)

low risk patch with a couple of null checks, fixing crash regression.Approving for uplift
Attachment #718016 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
You need to log in before you can comment on or make changes to this bug.