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

Unified Diff: content/renderer/render_widget.cc

Issue 2522353002: Remove the CHECK in RenderWidget::GetInputMethodController (Closed)
Patch Set: Back to checking for isWebFrameWidget() Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_widget.cc
diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc
index 637ad27559b658c23c9a6c38d8edf55d9d4391b8..e672024a83a2ad346d4f47b98aefcac25225ee99 100644
--- a/content/renderer/render_widget.cc
+++ b/content/renderer/render_widget.cc
@@ -2308,9 +2308,14 @@ blink::WebWidget* RenderWidget::GetWebWidget() const {
blink::WebInputMethodController* RenderWidget::GetInputMethodController()
const {
- // TODO(ekaramad): Remove this CHECK when GetWebWidget() is
- // always a WebFrameWidget.
- CHECK(GetWebWidget()->isWebFrameWidget());
+ if (!GetWebWidget()->isWebFrameWidget()) {
+ // TODO(ekaramad): We should not get here in response to IME IPC or updates
+ // when the RenderWidget is swapped out. We should top sending IPCs from the
+ // browser side (https://crbug.com/669219).
+ // If there is no WebFrameWidget, then there will be no
+ // InputMethodControllers for a WebLocalFrame.
+ return nullptr;
+ }
return static_cast<blink::WebFrameWidget*>(GetWebWidget())
->getActiveWebInputMethodController();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698