Closed
Bug 466751
Opened 16 years ago
Closed 16 years ago
setting .innerHTML to invalid markup in XHTML causes NS_ERROR_INVALID_POINTER
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla1.9.2a1
People
(Reporter: jqrusr.7.n1, Assigned: Gavin)
Details
Attachments
(1 file, 2 obsolete files)
3.46 KB,
patch
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.4) Gecko/2008111318 Ubuntu/8.10 (intrepid) Firefox/3.0.4 Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.4) Gecko/2008111318 Ubuntu/8.10 (intrepid) Firefox/3.0.4 The error that occurs when one sets .innerHTML to something that is not valid XHTML is very cryptic and does not hint at all at the cause of the error, making it very hard to find the source of the problem. Reproducible: Always Steps to Reproduce: 1. create a document that is used in XHMTL standards mode 2. have it include a javascript function that sets invalid markup (e.g. foo.innerHTML = '<div ">'; Actual Results: uncaught exception: [Exception... "Component returned failure code: 0x80004003 (NS_ERROR_INVALID_POINTER) [nsIDOMNSHTMLElement.innerHTML]" nsresult: "0x80004003 (NS_ERROR_INVALID_POINTER)" location: "JS frame :: file://... :: <TOP_LEVEL> :: line 15" data: no] Line 0 Expected Results: A better error message or anything else that's more useful.
Assignee | ||
Updated•16 years ago
|
Component: General → DOM
Product: Firefox → Core
QA Contact: general → general
Reporter | ||
Comment 1•16 years ago
|
||
Assignee | ||
Comment 2•16 years ago
|
||
The other caller of this method (nsRange::CreateContextualFragment) can already fail, so I think this should be OK.
Assignee: nobody → gavin.sharp
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Attachment #350094 -
Flags: superreview?(jst)
Attachment #350094 -
Flags: review?(jst)
Assignee | ||
Comment 3•16 years ago
|
||
That patch results in us throwing: Error: uncaught exception: [Exception... "An invalid or illegal string was specified" code: "12" nsresult: "0x8053000c (NS_ERROR_DOM_SYNTAX_ERR)" location: "https://bugzilla.mozilla.org/attachment.cgi?id=350091 Line: 15"] Either way we show a "not well formed" error in addition to the innerHTML exception, as far as I can tell, so this isn't *too* big of a deal.
OS: Linux → All
Hardware: PC → All
Assignee | ||
Updated•16 years ago
|
Version: unspecified → Trunk
Updated•16 years ago
|
Attachment #350094 -
Flags: superreview?(jst)
Attachment #350094 -
Flags: superreview+
Attachment #350094 -
Flags: review?(jst)
Attachment #350094 -
Flags: review+
Assignee | ||
Comment 4•16 years ago
|
||
Attachment #350091 -
Attachment is obsolete: true
Attachment #350094 -
Attachment is obsolete: true
Assignee | ||
Updated•16 years ago
|
Keywords: checkin-needed
Assignee | ||
Updated•16 years ago
|
Flags: in-testsuite?
Assignee | ||
Comment 5•16 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/e81a52c40a43
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Flags: in-testsuite? → in-testsuite+
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.2a1
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•