Closed
Bug 374334
Opened 18 years ago
Closed 17 years ago
Uncaught exception with cloneNode method and frameset element
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
FIXED
mozilla1.9alpha8
People
(Reporter: martijn.martijn, Assigned: WeirdAl)
Details
(Keywords: regression, testcase)
Attachments
(4 files, 1 obsolete file)
316 bytes,
text/html
|
Details | |
5.50 KB,
text/plain
|
Details | |
5.01 KB,
text/plain
|
Details | |
2.39 KB,
patch
|
jst
:
review+
jst
:
superreview+
|
Details | Diff | Splinter Review |
See testcase, I'm getting this uncaught exception in current trunk builds:
Error: uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMHTMLFrameSetElement.cloneNode]" nsresult: "0x80004005 (NS_ERROR_FAILURE)"
I should get an alert with "[object HTMLFrameSetElement]", which I get with current branch builds.
This regressed between 2005-10-27 and 2005-10-28:
http://bonsai.mozilla.org/cvsquery.cgi?treeid=default&module=all&branch=HEAD&branchtype=match&dir=&file=&filetype=match&who=&whotype=match&sortby=Date&hours=2&date=explicit&mindate=2005-10-27+04&maxdate=2005-10-28+06&cvsroot=%2Fcvsroot
Not sure which which bug might have caused this: bug 311827 or bug 308270 or bug 264308.
Assignee | ||
Comment 1•18 years ago
|
||
So, because there's an error in the script for the onclick attribute, everything unwinds until it ultimately causes the cloneNode operation to fail.
The error is not reported the second time around (very interesting).
Assignee | ||
Comment 2•18 years ago
|
||
The top six lines of this stack are identical.
Assignee | ||
Updated•18 years ago
|
Flags: blocking1.9?
So someone on the callstack should not be propagating the error here. Probably nsEventListenerManager::AddScriptEventListener or maybe nsGenericHTMLElement::AfterSetAttr. Additionally it would be good if nsJSContext::CompileEventHandler threw a better error so that whoever is stopping it could do so easier.
Alex, do you want to have a go at this one?
Assignee: general → ajvincent
Flags: blocking1.9? → blocking1.9+
Assignee | ||
Comment 4•18 years ago
|
||
Yeah, I'll take a look at it sometime over the next 3-7 days.
Status: NEW → ASSIGNED
Assignee | ||
Comment 5•18 years ago
|
||
This patch does fix the bug, but I don't know if using a DOM error code is appropriate for nsJSEnvironment.cpp. jst, what do you think we should return here? If we need a new error code, which .h file should define it and what should we call it?
Comment 6•18 years ago
|
||
Hmm, good questions. How about just using NS_ERROR_INVALID_VALUE in this case? Not ideal, but it's an existing error code that we could just use with enough of a similar meaning that we could pull that off. I'd think at least.
Assignee | ||
Comment 7•18 years ago
|
||
jst: NS_ERROR_INVALID_VALUE doesn't exist according to lxr. Did you mean NS_ERROR_ILLEGAL_VALUE?
Comment 8•18 years ago
|
||
Yeah, duh. I mixed up NS_ERROR_INVALID_ARG and NS_ERROR_ILLEGAL_VALUE.
Assignee | ||
Comment 9•18 years ago
|
||
per jst's comments.
Attachment #261078 -
Attachment is obsolete: true
Attachment #262068 -
Flags: superreview?
Attachment #262068 -
Flags: review?
Assignee | ||
Updated•18 years ago
|
Attachment #262068 -
Flags: superreview?(jonas)
Attachment #262068 -
Flags: superreview?
Attachment #262068 -
Flags: review?(jonas)
Attachment #262068 -
Flags: review?
Comment 10•18 years ago
|
||
Comment on attachment 262068 [details] [diff] [review]
updated patch
Jonas, if you have any problems with this patch, please speak up now :)
r+sr=jst
Attachment #262068 -
Flags: superreview?(jonas)
Attachment #262068 -
Flags: superreview+
Attachment #262068 -
Flags: review?(jonas)
Attachment #262068 -
Flags: review+
Assignee | ||
Updated•17 years ago
|
Whiteboard: [checkin needed]
Updated•17 years ago
|
Keywords: checkin-needed
Whiteboard: [checkin needed]
Comment 12•17 years ago
|
||
Checking in dom/src/base/nsJSEnvironment.cpp;
new revision: 1.327; previous revision: 1.326
Checking in content/events/src/nsEventListenerManager.cpp;
new revision: 1.276; previous revision: 1.275
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9beta1
Assignee | ||
Updated•6 years ago
|
Flags: in-testsuite?
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
•