Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(461)

Issue 1865143003: DO NOT SUBMIT: Handle nested message correctly for OnRequestTextInputState() (Closed)

Created:
4 years, 8 months ago by Changwan Ryu
Modified:
4 years, 6 months ago
CC:
chromium-reviews, darin-cc_chromium.org, jam, mkwst+moarreviews-renderer_chromium.org, mlamouri+watch-content_chromium.org, yabinh
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Handle nested message correctly for OnRequestTextInputState() The calls to OnMessageReceived can be nested: OnHandleInputEvent() may call OnRequestTextInputState() in the following scenario: 1) IME app calls ThreadedInputConnection#setComposingText(). 2) IME app calls ThreadedInputConnection#endBatchEdit(). 3) From 1), OnHandleInputEvent() calls JavaScript keyup event listener. 4) The event listener calls 'alert()'. 5) RenderFrameImpl::RunJavaScriptMessage() is called. 6) RenderViewImpl::SendAndRunNestedMessageLoop() is called. 7) Now RenderWidget::OnMessageReceived() calls OnRequestTextInputState() due to 2). BUG=551193

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+34 lines, -10 lines) Patch
M content/public/android/javatests/src/org/chromium/content/browser/input/ImeTest.java View 2 chunks +17 lines, -0 lines 0 comments Download
M content/renderer/render_widget.cc View 2 chunks +17 lines, -10 lines 1 comment Download

Messages

Total messages: 16 (4 generated)
Changwan Ryu
I found this failure case while testing something for another issue. PTAL.
4 years, 8 months ago (2016-04-07 10:38:37 UTC) #2
Changwan Ryu
https://codereview.chromium.org/1865143003/diff/1/content/renderer/render_widget.cc File content/renderer/render_widget.cc (left): https://codereview.chromium.org/1865143003/diff/1/content/renderer/render_widget.cc#oldcode1665 content/renderer/render_widget.cc:1665: DCHECK(!ime_event_guard_); FYI, this DCHECK was introduced in https://codereview.chromium.org/1278593004/diff2/260001:360001/content/renderer/render_widget.cc
4 years, 8 months ago (2016-04-07 11:48:18 UTC) #4
aelias_OOO_until_Jul13
This scenario is giving me a headache, I don't know if we want to let ...
4 years, 8 months ago (2016-04-07 14:49:00 UTC) #6
Avi (use Gerrit)
On 2016/04/07 14:49:00, aelias wrote: > This scenario is giving me a headache, I don't ...
4 years, 8 months ago (2016-04-07 14:50:26 UTC) #7
aelias_OOO_until_Jul13
On 2016/04/07 at 14:50:26, avi wrote: > I'm not sure we can right now. If ...
4 years, 8 months ago (2016-04-07 14:58:37 UTC) #8
Avi (use Gerrit)
On 2016/04/07 14:58:37, aelias wrote: > On 2016/04/07 at 14:50:26, avi wrote: > > I'm ...
4 years, 8 months ago (2016-04-07 15:05:01 UTC) #9
aelias_OOO_until_Jul13
I guess even in that world the Blink main thread still needs to freeze and ...
4 years, 8 months ago (2016-04-07 15:05:15 UTC) #10
Changwan Ryu
On 2016/04/07 15:05:15, aelias wrote: > I guess even in that world the Blink main ...
4 years, 8 months ago (2016-04-08 01:21:04 UTC) #11
aelias_OOO_until_Jul13
You're right, we shouldn't ignore it. I'm trying to think of the sanest way to ...
4 years, 8 months ago (2016-04-08 23:02:59 UTC) #12
Changwan Ryu
On 2016/04/08 23:02:59, aelias wrote: > You're right, we shouldn't ignore it. I'm trying to ...
4 years, 8 months ago (2016-04-12 17:21:01 UTC) #13
aelias_OOO_until_Jul13
On 2016/04/12 at 17:21:01, changwan wrote: > Hmm... I'm afraid that reposting the message in ...
4 years, 8 months ago (2016-04-12 18:03:25 UTC) #14
Changwan Ryu
4 years, 6 months ago (2016-06-01 07:50:45 UTC) #15
On 2016/04/12 18:03:25, aelias wrote:
> On 2016/04/12 at 17:21:01, changwan wrote:
> > Hmm... I'm afraid that reposting the message in the nested message loop
would
> change the sequence order of input messages.
> 
> I'm thinking that ordering-wise, reposting out actually *fixes* the sequence
> order.  Imagine an IME task is already queued up for the outer message loop
when
> the nested loop is entered (assuming that scenario is possible at all -- I'm
not
> sure of the implementation details).  Then, a message arrives to the nested
> message loop -- it must have been posted later in time by the browser.  If we
> process it immediately (status quo behavior), then the order is inverted.  We
> actually need to repost it to the end of the outer message loop to preserve
> original order.

Closing as https://codereview.chromium.org/1931793002 has been merged.

Powered by Google App Engine
This is Rietveld 408576698