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

Issue 2536943004: Fix a crash occuring during the destruction of TextInputManager on Android. (Closed)

Created:
4 years ago by EhsanK
Modified:
4 years ago
Reviewers:
Charlie Reis
CC:
chromium-reviews, yusukes+watch_chromium.org, shuchen+watch_chromium.org, jam, nona+watch_chromium.org, darin-cc_chromium.org, James Su, site-isolation-reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix a crash occuring during the destruction of TextInputManager on Android. On Android, in the observer call RenderWidgetHostViewAndroid::OnUpdateTextInputState we were using |updated_view| passed by TextInputManager to query TextInputState. This is correct as long as the view is not unregistered already, which happens when 1- If the |active_view_| is destroyed. 2- If TextInputManager is destoryed while there is |active_view_| which will lead to unregistering the view. This patch will change the way we obtain TextInputState in RenderWidgetHostViewAndroid. We now first verify if there is an active view/widget and then get the state. Otherwise, the default state (of NONE) is reported. This patch also adds a test to catch the regression. BUG=669375, 602723, 578168 Committed: https://crrev.com/db49e17a8e2c5874585e5a499171163ce70104ec Cr-Commit-Position: refs/heads/master@{#435178}

Patch Set 1 : First Adding a Test #

Patch Set 2 : Fixed the crash #

Patch Set 3 : Fixed a Compile Error in Test #

Total comments: 6

Patch Set 4 : Addressed creis@'s comments #

Total comments: 2

Patch Set 5 : Fixed a typo. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+38 lines, -15 lines) Patch
M chrome/browser/renderer_host/site_per_process_text_input_browsertest.cc View 1 2 2 chunks +21 lines, -1 line 0 comments Download
M content/browser/renderer_host/render_widget_host_view_android.cc View 1 1 chunk +5 lines, -1 line 0 comments Download
M content/browser/renderer_host/text_input_manager.h View 1 2 3 4 2 chunks +10 lines, -7 lines 0 comments Download
M content/browser/renderer_host/text_input_manager.cc View 1 2 3 1 chunk +2 lines, -6 lines 0 comments Download

Messages

Total messages: 36 (24 generated)
EhsanK
Hello Charlie, I was surprised to know that none of the SitePerProcessTextInputManager tests are running ...
4 years ago (2016-11-29 22:01:24 UTC) #4
Charlie Reis
Thanks for the quick fix and test! LGTM if we also remove the |view| parameter ...
4 years ago (2016-11-30 00:05:23 UTC) #9
EhsanK
Thanks Charlie. FYI, the test I added actually does not run on Android. I think ...
4 years ago (2016-11-30 00:34:25 UTC) #12
Charlie Reis
Thanks, LGTM with nit. On 2016/11/30 00:34:25, EhsanK wrote: > Thanks Charlie. > > FYI, ...
4 years ago (2016-11-30 00:57:51 UTC) #15
EhsanK
Thanks for the reviews! https://codereview.chromium.org/2536943004/diff/60001/content/browser/renderer_host/text_input_manager.h File content/browser/renderer_host/text_input_manager.h (right): https://codereview.chromium.org/2536943004/diff/60001/content/browser/renderer_host/text_input_manager.h#newcode133 content/browser/renderer_host/text_input_manager.h:133: // ui::TEXT_INPUT_TYPE_NONE.. On 2016/11/30 00:57:51, ...
4 years ago (2016-11-30 01:08:21 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2536943004/80001
4 years ago (2016-11-30 01:21:14 UTC) #23
commit-bot: I haz the power
Try jobs failed on following builders: blimp_linux_dbg on master.tryserver.chromium.linux (JOB_TIMED_OUT, no build URL) cast_shell_linux on ...
4 years ago (2016-11-30 03:11:24 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2536943004/80001
4 years ago (2016-11-30 04:47:54 UTC) #27
commit-bot: I haz the power
Exceeded global retry quota
4 years ago (2016-11-30 06:49:09 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2536943004/80001
4 years ago (2016-11-30 07:33:09 UTC) #31
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years ago (2016-11-30 08:45:12 UTC) #34
commit-bot: I haz the power
4 years ago (2016-11-30 08:50:18 UTC) #36
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/db49e17a8e2c5874585e5a499171163ce70104ec
Cr-Commit-Position: refs/heads/master@{#435178}

Powered by Google App Engine
This is Rietveld 408576698