Closed
Bug 220027
Opened 21 years ago
Closed 21 years ago
[FIX]Excessive assertions triggered by nsXMLElement::GetID()
Categories
(Core :: MathML, defect, P1)
Tracking
()
RESOLVED
FIXED
mozilla1.6alpha
People
(Reporter: rbs, Assigned: bzbarsky)
References
()
Details
Attachments
(2 files)
4.62 KB,
text/xml
|
Details | |
2.13 KB,
patch
|
peterv
:
review+
jst
:
superreview+
|
Details | Diff | Splinter Review |
nsresult
nsGenericContainerElement::GetAttr(PRInt32 aNameSpaceID, nsIAtom* aName,
nsIAtom** aPrefix,
nsAString& aResult) const
{
NS_ASSERTION(nsnull != aName, "must have attribute name");
NS_ASSERTION(aNameSpaceID != kNameSpaceID_Unknown,
"must have a real namespace ID!");
[...]
}
This later assertion fires a lot at:
http://www.mozilla.org/projects/mathml/demo/basics.xhtml
I basically have to abort the browser to get out.
Bonsai says that it was added by bz:
"3.272 <bzbarsky@mit.edu> 23 Jun 2003 23:45
Add asserts on people attempting to fetch attributes in the
kNamespaceID_Unknown namespace or call HasAttr on such. Bug 210314"
The document freely mixes MathML+XHTML with its default attributes in the usual
way. Is this now obsolete?
![]() |
Assignee | |
Comment 1•21 years ago
|
||
This GetID code is just completely bogus. It should be using kNameSpaceID_None
for the namespace it passes to GetAttr. And the assert in GetAttr is not only
correct, it caught a bug in this case. With the code as-is, the following MathML
<maction xlink:id="bar" id="baz">
would return "bar" from GetID, if I read the code right.
We should change nsXMLElement::GetID to do the right thing, and take out the
remnants of kNameSpace_Unknown stuff in nsGenericContainerElement::GetAttr.
![]() |
Assignee | |
Comment 2•21 years ago
|
||
![]() |
Assignee | |
Comment 3•21 years ago
|
||
![]() |
Assignee | |
Comment 4•21 years ago
|
||
Comment on attachment 132027 [details] [diff] [review]
Patch
jst? sicking? This is pretty straightforward...
Attachment #132027 -
Flags: superreview?(jst)
Attachment #132027 -
Flags: review?(bugmail)
![]() |
Assignee | |
Updated•21 years ago
|
Priority: -- → P1
Summary: Excessive assertions triggered by nsXMLElement::GetID() → [FIX]Excessive assertions triggered by nsXMLElement::GetID()
Target Milestone: --- → mozilla1.6alpha
Comment 5•21 years ago
|
||
Comment on attachment 132027 [details] [diff] [review]
Patch
sr=jst
Attachment #132027 -
Flags: superreview?(jst) → superreview+
Updated•21 years ago
|
Attachment #132027 -
Flags: review?(bugmail) → review+
![]() |
Assignee | |
Comment 6•21 years ago
|
||
Fixed. I don't think we need this on the 1.5 branch, do we?
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•