mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 05:41:12 +00:00
Bug 822755 - Don't process reply and always remove from action queue when processing stale actions; r=cpeterson
This commit is contained in:
parent
21795a7536
commit
9b012d1a29
@ -460,7 +460,7 @@ final class GeckoEditable
|
||||
|
||||
// GeckoEditableListener interface
|
||||
|
||||
void geckoActionReply() {
|
||||
private void geckoActionReply() {
|
||||
if (DEBUG) {
|
||||
// GeckoEditableListener methods should all be called from the Gecko thread
|
||||
GeckoApp.assertOnGeckoThread();
|
||||
@ -501,7 +501,6 @@ final class GeckoEditable
|
||||
if (action.mShouldUpdate) {
|
||||
geckoUpdateGecko(false);
|
||||
}
|
||||
mActionQueue.poll();
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -511,7 +510,17 @@ final class GeckoEditable
|
||||
GeckoApp.assertOnGeckoThread();
|
||||
}
|
||||
if (type == NOTIFY_IME_REPLY_EVENT) {
|
||||
geckoActionReply();
|
||||
try {
|
||||
if (mFocused) {
|
||||
// When mFocused is false, the reply is for a stale action,
|
||||
// and we should not do anything
|
||||
geckoActionReply();
|
||||
}
|
||||
} finally {
|
||||
// Ensure action is always removed from queue
|
||||
// even if stale action results in exception in geckoActionReply
|
||||
mActionQueue.poll();
|
||||
}
|
||||
return;
|
||||
}
|
||||
geckoPostToUI(new Runnable() {
|
||||
|
Loading…
Reference in New Issue
Block a user