Open Bug 620366 Opened 13 years ago Updated 2 years ago

nsStandardURL::Equals(nsnull) throws NS_ERROR_NULL_POINTER

Categories

(Core :: Networking, enhancement, P5)

enhancement

Tracking

()

People

(Reporter: neil, Unassigned)

Details

(Whiteboard: [necko-would-take])

By comparison, the behaviour of other in-tree implementations of nsIURI::Equals is as follows:
nsLDAPURL: returns false (uses do_QueryInterface plus redundant null check)
nsSimpleURI: returns false (null check, could use do_QueryInterface instead)
nsSimpleNestedURI: returns false (but throws if not initialised)
nsJARURI: returns false (null check, could use do_QueryObject instead)
nsMozIconURI: throws exception
nsNullPrincipalURI: crashes (I hope script can't see this!)
nsJSURI: returns false (null check, could use do_QueryObject instead)
nsFileDataURI: returns false (null check, could use do_QueryObject instead)
nsAddbookUrl, nsSmtpUrl: forwards to inner URI (lazy I know!)
nsMsgMailNewsUrl: returns false (uses do_QueryInterface)

So possibly nsStandardURL and nsMozIconURI should start returning false.
CCing Marco, who added a fix for such a case in http://hg.mozilla.org/mozilla-central/rev/080549b4c0f8
thanks, yes probably it should return false rather than throwing.
Whiteboard: [necko-would-take]
Bulk change to priority: https://bugzilla.mozilla.org/show_bug.cgi?id=1399258
Priority: -- → P5
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.