Remove an incorrect DCHECK.
The method RenderWidget::GetInputMethodController() can return nullptr in the following cases: 1- RenderWidget is swapped out. 2- There is no focused frame in the local root which accepts IME. 2.1 There are no focused local frames. 2.2 The focused local frame does not belong to the same local root as RenderWidget. 2.3 The focused local frame cannot accept IME since WebWidget is not focused (e.g., switched tabs). Therefore, to handle set composition IPC we should not assume controller can never be nullptr. A valid repro case: 1- Create an OOPIF in a page. 2- Add input in OOPIF. 3- Write javascript code which would randomly take focus away from OOPIF. 4- Activate some IME and start typing. Eventually, DCHECK fires because the IPC to set composition arrived after the widget lost the focused frame. BUG=578168 Review-Url: https://codereview.chromium.org/2558303003 Cr-Commit-Position: refs/heads/master@{#437904}
Showing
Please register or sign in to comment