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

Unified Diff: chrome/browser/renderer_host/text_input_client_mac.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: 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
« no previous file with comments | « no previous file | chrome/browser/renderer_host/text_input_client_mac_unittest.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/renderer_host/text_input_client_mac.mm
diff --git a/chrome/browser/renderer_host/text_input_client_mac.mm b/chrome/browser/renderer_host/text_input_client_mac.mm
index f78f8b32a318b283eb327d81b03a32ad22930d38..e1aea504ab06e9a6b6cbd4473dab95705fb0b2ab 100644
--- a/chrome/browser/renderer_host/text_input_client_mac.mm
+++ b/chrome/browser/renderer_host/text_input_client_mac.mm
@@ -84,6 +84,11 @@ NSAttributedString* TextInputClientMac::GetAttributedSubstringFromRange(
void TextInputClientMac::SetCharacterIndexAndSignal(NSUInteger index) {
lock_.Acquire();
+ // |index| could be WTF::notFound (-1) and it's value is different from
+ // NSNotFound so we need to convert it.
+ if (index == static_cast<NSUInteger>(-1)) {
Robert Sesek 2011/05/19 15:16:56 I think a better place to do this would be in text
bashi 2011/05/20 04:43:15 Moved it to text_input_client_message_filter.mm.
+ index = NSNotFound;
+ }
character_index_ = index;
lock_.Release();
condition_.Signal();
« no previous file with comments | « no previous file | chrome/browser/renderer_host/text_input_client_mac_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698