nsStandardURL::Equals(nsnull) throws NS_ERROR_NULL_POINTER

NEW
Unassigned

Status

()

Core
Networking
P5
enhancement
7 years ago
2 months ago

People

(Reporter: neil@parkwaycc.co.uk, Unassigned)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [necko-would-take])

(Reporter)

Description

7 years ago
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.

Comment 1

7 years ago
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
You need to log in before you can comment on or make changes to this bug.