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

Issue 2526563004: Fix renderer crashes due to non-existing RenderFrameImpl or WebFrameWidget during Navigations (Closed)

Created:
4 years ago by EhsanK
Modified:
4 years ago
Reviewers:
Avi (use Gerrit)
CC:
chromium-reviews, mlamouri+watch-content_chromium.org, jam, darin-cc_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix renderer crashes due to non-existing RenderFrameImpl or WebFrameWidget during Navigations When navigating the main frame, the RenderViewImpl lingers around with no WebFrameWidget. This yields a WebViewImpl in a call to RenderWidget::GetWebWidget(). When user interactions leads to an IME IPC for FirstRectForCharacterRange, the IPC migth arrive during the navigation and lead to an invalid cast in TextInputClientObserver::GetFocusedFrame(). This CL will avoid those casts by explicitly verifying that the WebWidget returned from GetWebWidget() is a WebFrameWidget. Also, the IPC handling in TextInputClientObserver is modified such that it now considers the possibilities of nullptr outputs from GetFocusedFrame() and GetWebFrameWidget(). BUG=664890 Committed: https://crrev.com/95df18c257f410cff287f0b402dd50b3014c7784 Cr-Commit-Position: refs/heads/master@{#434302}

Patch Set 1 #

Patch Set 2 : Fixed a comment #

Total comments: 2

Patch Set 3 : Fixed a Bug (and failing tests) #

Unified diffs Side-by-side diffs Delta from patch set Stats (+31 lines, -17 lines) Patch
M content/renderer/text_input_client_observer.cc View 1 2 3 chunks +31 lines, -17 lines 0 comments Download

Messages

Total messages: 33 (20 generated)
EhsanK
Hello Avi, Could you please take a look at this. Also, a fix for this ...
4 years ago (2016-11-23 19:02:13 UTC) #5
Avi (use Gerrit)
https://codereview.chromium.org/2526563004/diff/20001/content/renderer/text_input_client_observer.cc File content/renderer/text_input_client_observer.cc (right): https://codereview.chromium.org/2526563004/diff/20001/content/renderer/text_input_client_observer.cc#newcode103 content/renderer/text_input_client_observer.cc:103: mac::AttributedStringCoder::Encode(string)); Is it safe to pass nil to mac::AttributedStringCoder::Encode?
4 years ago (2016-11-23 21:17:36 UTC) #6
EhsanK
Thanks Avi. PTAL. https://codereview.chromium.org/2526563004/diff/20001/content/renderer/text_input_client_observer.cc File content/renderer/text_input_client_observer.cc (right): https://codereview.chromium.org/2526563004/diff/20001/content/renderer/text_input_client_observer.cc#newcode103 content/renderer/text_input_client_observer.cc:103: mac::AttributedStringCoder::Encode(string)); On 2016/11/23 21:17:36, Avi wrote: ...
4 years ago (2016-11-23 21:31:32 UTC) #7
Avi (use Gerrit)
lgtm Hm. OK.
4 years ago (2016-11-23 21:33:21 UTC) #8
EhsanK
Thanks Avi. I will try to land this today and monitor Canary for crashes. Hopefully ...
4 years ago (2016-11-23 22:05:00 UTC) #10
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/2526563004/20001
4 years ago (2016-11-23 22:05:22 UTC) #14
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/2526563004/40001
4 years ago (2016-11-23 22:30:42 UTC) #20
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-24 00:34:09 UTC) #22
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/2526563004/40001
4 years ago (2016-11-24 00:37:16 UTC) #24
commit-bot: I haz the power
Try jobs failed on following builders: chromeos_amd64-generic_chromium_compile_only_ng on master.tryserver.chromium.linux (JOB_TIMED_OUT, no build URL) chromeos_daisy_chromium_compile_only_ng on ...
4 years ago (2016-11-24 02:38:52 UTC) #26
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/2526563004/40001
4 years ago (2016-11-24 03:08:20 UTC) #28
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years ago (2016-11-24 05:06:58 UTC) #31
commit-bot: I haz the power
4 years ago (2016-11-24 05:09:22 UTC) #33
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/95df18c257f410cff287f0b402dd50b3014c7784
Cr-Commit-Position: refs/heads/master@{#434302}

Powered by Google App Engine
This is Rietveld 408576698