Closed Bug 472635 Opened 11 years ago Closed 11 years ago

Do nothing if im contexts don't match

Categories

(Core :: Widget: Gtk, defect, critical)

x86
OpenSolaris
defect
Not set
critical

Tracking

()

RESOLVED FIXED

People

(Reporter: ginnchen+exoracle, Assigned: ginnchen+exoracle)

Details

(Keywords: fixed1.9.1, hang, inputmethod)

Attachments

(1 file)

1.45 KB, patch
masayuki
: review+
masaki.katakai
: review+
beltzner
: approval1.9.1+
Details | Diff | Splinter Review
On a certain configuration, a customer reported Firefox 3 will hang on startup.
The configuration is:
The server side has IIIM but didn't login to desktop. (i.e. iiim daemon isn't running)
The remote side turned off IME in iiim-properties, use ssh -X to connect to server.

When I look into it, I found a weird thing.
Firefox gets "preedit_changed" signal on mIMEData->mContext, but before that, it has already called nsWindow::SetIMEEnabled(0), it did gtk_im_context_reset for mIMEData->mContext.
So in IM_preedit_changed_cb, IMEComposeText is actually working on mIMEData->mDummyContext.

I think perhaps we should add a check in IM_preedit_changed_cb and IM_commit_cb.
We should do nothing if aContext doesn't equal to IM_get_input_context(window).

And after adding this code, the hang is gone.
Attached patch patchSplinter Review
Assignee: nobody → ginn.chen
Attachment #355931 - Flags: review?(masayuki)
Comment on attachment 355931 [details] [diff] [review]
patch

Sounds reasonable, and looks ok for me.
But I want Katakai-san's review before +'ing.
Attachment #355931 - Flags: review?(masaki.katakai)
Severity: normal → critical
Keywords: hang
Attachment #355931 - Flags: review?(masaki.katakai) → review+
Comment on attachment 355931 [details] [diff] [review]
patch

Looks fine for me.
Attachment #355931 - Flags: superreview?(roc)
Attachment #355931 - Flags: review?(masayuki)
Attachment #355931 - Flags: review+
Attachment #355931 - Flags: superreview?(roc) → superreview+
Ginn:

Can you commit the patch? If you don't have a permission, I'll do it.
Keywords: checkin-needed
Keywords: checkin-needed
Pushed
http://hg.mozilla.org/mozilla-central/rev/9860a796f20d
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Attachment #355931 - Flags: approval1.9.1?
Comment on attachment 355931 [details] [diff] [review]
patch

a191=beltzner
Attachment #355931 - Flags: approval1.9.1? → approval1.9.1+
You need to log in before you can comment on or make changes to this bug.