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

Issue 1357883002: Mac: Fix a crash in TextInputClientMac::GetFirstRectForRange() likely during tab closure (Closed)

Created:
5 years, 3 months ago by tapted
Modified:
5 years, 3 months ago
CC:
chromium-reviews, yusukes+watch_chromium.org, shuchen+watch_chromium.org, jam, nona+watch_chromium.org, darin-cc_chromium.org, James Su, chrome-apps-syd-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Mac: Fix a crash in TextInputClientMac::GetFirstRectForRange() likely during tab closure Delayed events from IME / HIToolbox can arrive for an NSView after RenderWidgetHostViewMac::Destroy() has been called. In this case, the render_widget_host_ has been set to null, which can result in a crash under TextInputClientMac::GetFirstRectForRange() when it tries to determine the RenderWidgetHostImpl from a null pointer. Per suggestions/analysis in the bug, to fix, add a null check in RenderWidgetHostViewCocoa's implementation of -[NSTextInputClient firstRectForCharacterRange:actualRange]. Then, return NSZeroRect. Rather than crashing the browser, this would have the effect of showing the IME window in the bottom left of the window. BUG=481281 Committed: https://crrev.com/d46c7beeacc54dac31acb1865963cefb96a0b064 Cr-Commit-Position: refs/heads/master@{#350261}

Patch Set 1 #

Patch Set 2 : window -> tab #

Patch Set 3 : cancelComposition, test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+39 lines, -1 line) Patch
M content/browser/renderer_host/render_widget_host_view_mac.mm View 1 2 1 chunk +7 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_mac_unittest.mm View 1 2 3 chunks +32 lines, -1 line 0 comments Download

Messages

Total messages: 13 (4 generated)
tapted
Hi Alexei, please take a look.
5 years, 3 months ago (2015-09-21 05:41:25 UTC) #2
Alexei Svitkine (slow)
Bottom-left doesn't seem ideal to me. If the window still exists, can we return a ...
5 years, 3 months ago (2015-09-21 15:09:16 UTC) #3
groby-ooo-7-16
Do we really care about the placement? It's during tab closure only that this can ...
5 years, 3 months ago (2015-09-21 18:16:08 UTC) #5
tapted
On 2015/09/21 15:09:16, Alexei Svitkine (slow) wrote: > Bottom-left doesn't seem ideal to me. If ...
5 years, 3 months ago (2015-09-22 07:28:17 UTC) #7
Alexei Svitkine (slow)
LGTM++
5 years, 3 months ago (2015-09-22 14:55:59 UTC) #8
groby-ooo-7-16
LGTM, since I accidentally ended up on reviewers.
5 years, 3 months ago (2015-09-22 19:57:14 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1357883002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1357883002/60001
5 years, 3 months ago (2015-09-22 22:53:30 UTC) #11
commit-bot: I haz the power
Committed patchset #3 (id:60001)
5 years, 3 months ago (2015-09-22 23:28:57 UTC) #12
commit-bot: I haz the power
5 years, 3 months ago (2015-09-22 23:29:24 UTC) #13
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/d46c7beeacc54dac31acb1865963cefb96a0b064
Cr-Commit-Position: refs/heads/master@{#350261}

Powered by Google App Engine
This is Rietveld 408576698