Closed Bug 1236705 Opened 10 years ago Closed 9 years ago

Regression in GeckoEditable.onTextChange when handling certain changes

Categories

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

45 Branch
All
Android
defect
Not set
normal

Tracking

(firefox44 unaffected, firefox45+ fixed, firefox46 fixed, fennec45+)

RESOLVED FIXED
Firefox 46
Tracking Status
firefox44 --- unaffected
firefox45 + fixed
firefox46 --- fixed
fennec 45+ ---

People

(Reporter: jchen, Assigned: jchen)

References

Details

(Keywords: crash, regression)

Crash Data

Attachments

(1 file)

This is a regression from bug 1051556, which had a patch to optimize GeckoEditable.onTextChange. However, that patch introduced a regression where data loss can occur if the changed text has a larger range than expected.
Handle all text change scenarios efficiently but correctly. In particular, when we have a pending "replace text" action, make sure we preserve old and new spans as much as we can, and make sure we merge the text from the pending action with the actual changed text.
Attachment #8703860 - Flags: review?(esawin)
Will this fix bug 1236715?
Comment on attachment 8703860 [details] [diff] [review] Correctly handle all text change scenarios (v1) Review of attachment 8703860 [details] [diff] [review]: ----------------------------------------------------------------- ::: mobile/android/base/java/org/mozilla/gecko/GeckoEditable.java @@ +1058,3 @@ > // The new text exactly matches our sequence, so do a direct replace. > geckoReplaceText(start, oldEnd, action.mSequence); > + Blank line.
Attachment #8703860 - Flags: review?(esawin) → review+
Jim, could you fill the uplift request to aurora? Thanks
Crash Signature: [@ java.lang.IllegalArgumentException: invalid selection notification range at org.mozilla.gecko.GeckoEditable.onSelectionChange(GeckoEditable.java)]
Flags: needinfo?(nchen)
Keywords: crash
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 46
tracking-fennec: --- → 45+
Comment on attachment 8703860 [details] [diff] [review] Correctly handle all text change scenarios (v1) Approval Request Comment [Feature/regressing bug #]: Bug 1051556 [User impact if declined]: Crash on some pages [Describe test coverage new/current, TreeHerder]: Locally, m-c [Risks and why]: Small, patch introduces some new code, but it should be more robust than before [String/UUID change made/needed]: None
Flags: needinfo?(nchen)
Attachment #8703860 - Flags: approval-mozilla-aurora?
Comment on attachment 8703860 [details] [diff] [review] Correctly handle all text change scenarios (v1) Fix a crash, taking it.
Attachment #8703860 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Depends on: 1241558
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
I'll open a new bug for the recent crashes.
Status: REOPENED → RESOLVED
Closed: 10 years ago9 years ago
Resolution: --- → FIXED
Version: unspecified → 45 Branch
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: