Closed Bug 1805799 Opened 2 years ago Closed 2 years ago

Crash in `TSFTextStore::Selection::Length` if logging IMEHandler:4

Categories

(Core :: DOM: UI Events & Focus Handling, defect, P2)

Desktop
Windows
defect

Tracking

()

RESOLVED FIXED
110 Branch
Tracking Status
firefox110 --- fixed

People

(Reporter: masayuki, Assigned: masayuki)

References

(Blocks 1 open bug)

Details

(Keywords: inputmethod)

Attachments

(1 file)

ToString(mSelectionForTSF).c_str() runs TSFTextStore::Selection::operator<<
if it's some. Then, it calls TSFTextStore::Selection::Length always.
https://searchfox.org/mozilla-central/rev/17aeb39742eba71e0936ae44a51a54197100166d/widget/windows/TSFTextStore.h#725

However, TSFTextStore::Selection::mACP can be nothing if there is no
Selection ranges. Therefore, the MOZ_ASSERT(mACP->acpEnd >= mACP->acpStart)
hits Maybe<T>.isSome() check in -> operator.
https://searchfox.org/mozilla-central/rev/17aeb39742eba71e0936ae44a51a54197100166d/widget/windows/TSFTextStore.h#681

Pushed by masayuki@d-toybox.com: https://hg.mozilla.org/integration/autoland/rev/badee7c29983 Make `TSFTextStore::Selection::Length` use `MOZ_ASSERT_IF` instead of `MOZ_ASSERT` to access `Maybe<TS_SELECTION_ACP>` r=m_kato
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 110 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: