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

Unified Diff: content/browser/renderer_host/render_widget_host_view_mac.mm

Issue 2732143002: Fixing a crash due to calling [RWHVCocoa attributedSubstringForProposedRange] when there is no focu… (Closed)
Patch Set: Created 3 years, 9 months 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/browser/renderer_host/render_widget_host_view_mac.mm
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm
index b67a5f3d160e4521c879bcdb7bf30b7fa005876a..d517eb53a63a0693e798c0ade244ab3231a55324 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
@@ -3097,7 +3097,7 @@ extern NSString *NSTextInputReplacementRangeAttributeName;
if (!selection)
return nil;
- if (!compositionInfo->range.is_empty()) {
+ if (compositionInfo && !compositionInfo->range.is_empty()) {
EhsanK 2017/03/06 23:36:19 We do get here when <input> is not focused (left s
Avi (use Gerrit) 2017/03/06 23:39:10 Can you drop a note in the code explaining when th
EhsanK 2017/03/07 02:48:52 Sure. I still don't know the exact repro but I wil
expected_text = &markedText_;
expected_range = compositionInfo->range;
} else {
« 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