Closed Bug 221387 Opened 21 years ago Closed 21 years ago

XPathExpression.createExpression doesn't throw NAMESPACE_ERR

Categories

(Core :: XSLT, defect, P3)

defect

Tracking

()

RESOLVED FIXED
mozilla1.6alpha

People

(Reporter: peterv, Assigned: peterv)

Details

Attachments

(2 files, 2 obsolete files)

Making this happen will involve moving the voidable string class out of XPConnect, since we need it to detect null namespaces from lookupNamespaceURI.
Attachment #132740 - Flags: superreview?(dbaron)
Attachment #132740 - Flags: review?(jst)
Attachment #132741 - Flags: superreview?(jst)
Attachment #132741 - Flags: review?(axel)
Status: NEW → ASSIGNED
Priority: -- → P3
Target Milestone: --- → mozilla1.6alpha
Comment on attachment 132741 [details] [diff] [review] Use voidable string to detect unknown prefixes >Index: extensions/transformiix/source/xpath/nsXPathEvaluator.cpp <...> >- *aResult = new nsXPathExpression(expression, mRecycler); >+ *aResult = new nsXPathExpression(expression.forget(), mRecycler); > if (!*aResult) { >- delete expression; > return NS_ERROR_OUT_OF_MEMORY; > } > This leaks the expression on out-of-mem. .forget() it on success, not before. Or use a nsAutoPtr&. I don't need a new patch for that, though, so r=axel@pike.org
Attachment #132741 - Flags: review?(axel) → review+
Comment on attachment 132740 [details] [diff] [review] Move voidable string from xpconnect to xpcom If this is going to be used in more places, I'd rather see the virtual functions defined in the .cpp file rather than the .h file. sr=dbaron with or without that, though.
Attachment #132740 - Flags: superreview?(dbaron) → superreview+
Attachment #132740 - Attachment is obsolete: true
Attachment #132741 - Attachment is obsolete: true
Attachment #132919 - Flags: superreview+
Attachment #132919 - Flags: review?(jst)
Attachment #132920 - Flags: superreview?(jst)
Attachment #132920 - Flags: review+
Attachment #132740 - Flags: review?(jst)
Attachment #132741 - Flags: superreview?(jst)
Comment on attachment 132919 [details] [diff] [review] Move voidable string from xpconnect to xpcom r=bzbarsky
Attachment #132919 - Flags: review?(jst) → review+
Comment on attachment 132920 [details] [diff] [review] Use voidable string to detect unknown prefixes sr=bzbarsky
Attachment #132920 - Flags: superreview?(jst) → superreview+
Checked in.
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
It'd be really cool if our new widely usable nsVoidableString wasn't obsolete starting from its birth, but oh well :-)
I didn't realize the stuff in string/obsolete was obsolete :-P.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: