Last Comment Bug 750073 - Use nsContentUtils::WordBreaker() in nsTextServicesDocument::FindWordBounds
: Use nsContentUtils::WordBreaker() in nsTextServicesDocument::FindWordBounds
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Editor (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla15
Assigned To: :Ms2ger
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-04-29 08:21 PDT by :Ms2ger
Modified: 2012-05-05 10:26 PDT (History)
1 user (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Patch v1 (1.77 KB, patch)
2012-04-29 08:21 PDT, :Ms2ger
ehsan: review+
Details | Diff | Review

Description :Ms2ger 2012-04-29 08:21:56 PDT
Created attachment 619404 [details] [diff] [review]
Patch v1
Comment 1 :Ehsan Akhgari (busy, don't ask for review please) 2012-04-30 10:49:48 PDT
Comment on attachment 619404 [details] [diff] [review]
Patch v1

Review of attachment 619404 [details] [diff] [review]:
-----------------------------------------------------------------

::: editor/txtsvc/src/nsTextServicesDocument.cpp
@@ +3755,5 @@
>  
> +  nsIWordBreaker* wordBreaker = nsContentUtils::WordBreaker();
> +  nsWordRange res = wordBreaker->FindWord(str, strLen, strOffset);
> +  if (res.mBegin > strLen) {
> +    return !str ? NS_ERROR_NULL_POINTER : NS_ERROR_ILLEGAL_VALUE;

Nit: please remove the !, and reverse the error values.

Note You need to log in before you can comment on or make changes to this bug.