Closed
Bug 327571
Opened 19 years ago
Closed 19 years ago
"ASSERTION: nsDOMClassInfo::GetProperty Don't call me!" when getting an input element by name through the prototype of another dom node
Categories
(Core :: DOM: Core & HTML, defect, P3)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla1.9alpha1
People
(Reporter: jruderman, Assigned: mrbkap)
Details
(Keywords: assertion, testcase, Whiteboard: [patch])
Attachments
(2 files)
307 bytes,
text/html
|
Details | |
6.84 KB,
patch
|
jst
:
review+
brendan
:
superreview+
|
Details | Diff | Splinter Review |
###!!! ASSERTION: nsDOMClassInfo::GetProperty Don't call me!: 'Error', file /Users/admin/trunk/mozilla/dom/src/base/nsDOMClassInfo.cpp, line 3327
Reporter | ||
Comment 1•19 years ago
|
||
Reporter | ||
Comment 2•19 years ago
|
||
I've been hitting this assertion a lot when playing with bug 326633, so I'd appreciate a fix.
Assignee | ||
Comment 3•19 years ago
|
||
jst and I talked this over and there's no easy and performant way to fix this bug for real. Currently, XPCWrappedNative uses a different class getter based on whether or not a given class has the flag WantGetProperty(). This is to avoid the test for whether or not |this| has that flag. Unfortunately, mutable prototypes make this optimization violate the assertions in nsDOMClassInfo. Fixing this in any way in XPConnect will likely break other places that don't depend on this behavior (i.e., any such fix would not be specific enough) and would also hurt performance in a case where I don't think we care _too_ much what we do, as long as we don't crash. I have a patch to turn the assertions into warnings, since this seems like a valid case that will hit them.
OS: MacOS X → All
Priority: -- → P3
Hardware: Macintosh → All
Whiteboard: [patch]
Target Milestone: --- → mozilla1.9alpha
Assignee | ||
Comment 4•19 years ago
|
||
Assignee: general → mrbkap
Status: NEW → ASSIGNED
Attachment #212665 -
Flags: superreview?(brendan)
Attachment #212665 -
Flags: review?(jst)
Comment 5•19 years ago
|
||
Comment on attachment 212665 [details] [diff] [review]
Make this case not assert
rs=me. We need a bug to make __proto__ readonly as well as permanent for DOM stuff, if not for XPConnect stuff.
/be
Attachment #212665 -
Flags: superreview?(brendan) → superreview+
Comment 6•19 years ago
|
||
Comment on attachment 212665 [details] [diff] [review]
Make this case not assert
r=jst
People rely on changing DOM object prototypes, some of the JS libraries out there that implement outerHTML and other IE:ism's do just that...
Attachment #212665 -
Flags: review?(jst) → review+
Assignee | ||
Comment 7•19 years ago
|
||
Fix checked into trunk.
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Do they really set a new __proto__ to do that? Don't they just set properties on the existing prototypes.
Comment 9•19 years ago
|
||
(In reply to comment #8)
> Do they really set a new __proto__ to do that? Don't they just set properties
> on the existing prototypes.
>
Sorry, I was replying based on me misunderstanding something mrbkap told me in person. No, generally people add/remove from the existing protos, I've very rarely, if ever, seen real code out there that replaces a DOM object's __proto__ property.
Reporter | ||
Comment 10•19 years ago
|
||
I can verify that this is fixed on Mac, but has a bug been filed based on comment 5?
You need to log in
before you can comment on or make changes to this bug.
Description
•