Closed
Bug 121833
Opened 24 years ago
Closed 24 years ago
ASSERTION: |First()| on an empty string: 'Length()>0'
Categories
(Core Graveyard :: RDF, defect, P3)
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla0.9.9
People
(Reporter: timeless, Assigned: waterson)
References
()
Details
(Keywords: assertion)
Attachments
(1 file, 3 obsolete files)
|
1.85 KB,
patch
|
timeless
:
review+
shaver
:
superreview+
|
Details | Diff | Splinter Review |
#3 0x282fb76c in nsAString::First (this=0xbfbfa428) at /home/timeless/mozilla/string/src/nsAString.cpp:140
#4 0x28d1a969 in rdf_MakeRelativeRef (aBaseURI=@0xbfbfa394, aURI=@0xbfbfa428)
at /home/timeless/mozilla/rdf/base/src/rdfutil.cpp:84
#5 0x28d17af9 in nsRDFXMLSerializer::SerializeDescription (this=0x8bcd0c0, aStream=0x8b89604,
aResource=0x8bf7360) at /home/timeless/mozilla/rdf/base/src/nsRDFXMLSerializer.cpp:535
#6 0x28d1a7ca in nsRDFXMLSerializer::Serialize (this=0x8bcd0c0, aStream=0x8b89604)
at /home/timeless/mozilla/rdf/base/src/nsRDFXMLSerializer.cpp:1040
#7 0x28d13db6 in RDFXMLDataSourceImpl::Serialize (this=0x8b9c300, aStream=0x8b89604)
at /home/timeless/mozilla/rdf/base/src/nsRDFXMLDataSource.cpp:1096
#8 0x28d130b9 in RDFXMLDataSourceImpl::Flush (this=0x8b9c300)
at /home/timeless/mozilla/rdf/base/src/nsRDFXMLDataSource.cpp:831
#9 0x282ea9b8 in XPTC_InvokeByIndex (that=0x8b9c304, methodIndex=6, paramCount=0, params=0xbfbfaabc)
at /home/timeless/mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_unixish_x86.cpp:153
| Assignee | ||
Comment 2•24 years ago
|
||
Don't we just need to check if aURI IsEmpty?
| Assignee | ||
Updated•24 years ago
|
Comment 3•24 years ago
|
||
Comment on attachment 66459 [details] [diff] [review]
wouldn't this be simpler?
r=tingley.
rdf_MakeRelativeName looks like it could have the same issue, but I'm not sure
it would ever actually arise. (Actually, I'm not sure the function is ever
called.)
A couple other spots with this pattern too (one in nsRDFXMLSerializer.cpp that
should be fine, and one in nsRDFParserUtils::StripAndConvert
that looks like it might be possible to trigger).
Attachment #66459 -
Flags: review+
| Assignee | ||
Comment 4•24 years ago
|
||
Sho'nuff. rdf_MakeRelativeName is unused. Removed it. I think the usage of
`First' in nsRDFXMLSerializer.cpp should be fine, and the use in
nsRDFParserUtils.cpp is already protected by an IsEmpty check.
Attachment #66459 -
Attachment is obsolete: true
Comment 5•24 years ago
|
||
Comment on attachment 66470 [details] [diff] [review]
remove unused function, too
sr=shaver.
Attachment #66470 -
Flags: superreview+
| Assignee | ||
Comment 6•24 years ago
|
||
I found timeless on IRC and it turns out he was trying to optimize this code,
as well. The string-fu here is archaic: this last patch cleans up timeless's
optimization, and uses Substring rather than Find.
Attachment #66456 -
Attachment is obsolete: true
Attachment #66470 -
Attachment is obsolete: true
Comment on attachment 66485 [details] [diff] [review]
one more time
i like it.
Attachment #66485 -
Flags: review+
Comment 8•24 years ago
|
||
Comment on attachment 66485 [details] [diff] [review]
one more time
Yeah, sure, whatever. sr=shaver.
Attachment #66485 -
Flags: review+ → superreview+
Comment on attachment 66485 [details] [diff] [review]
one more time
r=timeless [patch manager collision]
Attachment #66485 -
Flags: review+
| Assignee | ||
Comment 10•24 years ago
|
||
Fixed. Thanks!
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Updated•7 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•