DescriptionMac: 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 #
Messages
Total messages: 13 (4 generated)
|