Closed Bug 331368 Opened 18 years ago Closed 18 years ago

Spellchecker errors on in content iterator

Categories

(Core :: Spelling checker, defect, P1)

defect

Tracking

()

RESOLVED FIXED

People

(Reporter: brettw, Assigned: brettw)

Details

(Keywords: fixed1.8.1)

Attachments

(1 file)

WARNING: NS_ENSURE_TRUE(NS_SUCCEEDED(rv)) failed, file /usr/local/google/home/brettw/branchspell/mozilla/editor/txtsvc/src/nsFilteredContentIterator.cpp, line 110
WARNING: NS_ENSURE_TRUE(NS_SUCCEEDED(res)) failed, file /usr/local/google/home/brettw/branchspell/mozilla/extensions/spellcheck/src/mozInlineSpellChecker.cpp, line 999
Attached patch PatchSplinter Review
The problem was that the range would be an empty range on the document DOM element, which would then fail when we tried to create an iterator for it.

The code checks to see if the range is collapsed, but then doesn't do anything with the value. I added a check and return if it is collapsed.

I'm a little unsure about this. Is this the proper thing? Can we have a collapsed range in the middle of a word and does that mean we need to spellcheck the word?

I didn't see any problems in using it with this patch applied.
Attachment #215920 - Flags: review?(mscott)
Component: General → Spelling checker
Flags: review?(mscott)
Product: Firefox → Core
QA Contact: general → spelling-checker
Gavin: why did you cancel the review request?
Sorry, the component move canceled the request, and Bugzilla didn't tell me (bug 274802).
Attachment #215920 - Flags: review?(mscott)
Attachment #215920 - Flags: approval-branch-1.8.1?(mscott)
Comment on attachment 215920 [details] [diff] [review]
Patch

I think this should be ok.
Attachment #215920 - Flags: review?(mscott)
Attachment #215920 - Flags: review+
Attachment #215920 - Flags: approval-branch-1.8.1?(mscott)
Attachment #215920 - Flags: approval-branch-1.8.1+
Fixed on trunk. Leaving open so I don't forget to check into branch.
Whiteboard: fixed trunk
Priority: -- → P1
Fixed on branch.
Status: NEW → RESOLVED
Closed: 18 years ago
Keywords: fixed1.8.1
Resolution: --- → FIXED
Whiteboard: fixed trunk
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: