Open Bug 387630 Opened 19 years ago Updated 4 years ago

uncaught exception, (NS_ERROR_ILLEGAL_VALUE) [nsISelection.getRangeAt]

Categories

(Toolkit :: View Source, defect)

x86
Windows XP
defect

Tracking

()

People

(Reporter: martijn.martijn, Unassigned)

References

()

Details

(Keywords: testcase)

Attachments

(1 file)

Attached file testcase —
See testcase. Content can remove the ranges from the selection, which makes View Selection Source throw this error: Error: uncaught exception: [Exception... "Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsISelection.getRangeAt]" nsresult: "0x80070057 (NS_ERROR_ILLEGAL_VALUE)" location: "JS frame :: chrome://global/content/viewPartialSource.js :: viewPartialSourceForSelection :: line 54" data: no] Probably, the code should first check if the selection's rangeCount is not 0 or something like that.
i think that the problem is that ViewSource (and ViewSourcePartial) shouldn't work for items without a source as txt, images, etc...
Product: Firefox → Toolkit
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: