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

Unified Diff: chrome/browser/renderer_host/text_input_client_message_filter.mm

Issue 7039054: Fix assertion failure in range.mm while examining system dictionary popup. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Addressed bot failure. Created 9 years, 7 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
Index: chrome/browser/renderer_host/text_input_client_message_filter.mm
diff --git a/chrome/browser/renderer_host/text_input_client_message_filter.mm b/chrome/browser/renderer_host/text_input_client_message_filter.mm
index 7bfbdfc2f31675fed554254a8cbdd74c456ee0aa..f86766615896526d90edbbcd431e08d5527a0a62 100644
--- a/chrome/browser/renderer_host/text_input_client_message_filter.mm
+++ b/chrome/browser/renderer_host/text_input_client_message_filter.mm
@@ -43,6 +43,11 @@ bool TextInputClientMessageFilter::OnMessageReceived(
void TextInputClientMessageFilter::OnGotCharacterIndexForPoint(size_t index) {
TextInputClientMac* service = TextInputClientMac::GetInstance();
+ // |index| could be WTF::notFound (-1) and it's value is different from
+ // NSNotFound so we need to convert it.
+ if (index == static_cast<size_t>(-1)) {
+ index = NSNotFound;
+ }
service->SetCharacterIndexAndSignal(index);
}

Powered by Google App Engine
This is Rietveld 408576698