Closed Bug 927735 Opened 6 years ago Closed 6 years ago
The URL constructor and the URL
.href setter shouldn't throw XPath Exception
They should use aRv.ThrowTypeError(). If some C++ callers use URL::Constructor or URL::SetHref, they will have to call rv.ClearMessage() on failure. See nsContentUtils::ConvertStringFromCharset for an example.
Comment on attachment 818245 [details] [diff] [review] exceptions2.patch >+ is(e.name, 'TypeError', "error: typeError"); |e instanceof TypeError| would be better to make sure that e is not a DOMException.
Attachment #818245 - Flags: feedback?(VYV03354) → feedback+
Summary: The URL constructor and the URL.href setter throws XPathException → The URL constructor and the URL.href setter shouldn't throw XPathException
Assignee: nobody → amarchesini
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla27
> They will have to call rv.ClearMessage() on failure. That seems really annoying. I filed bug 933378 to make this more safe.
You need to log in before you can comment on or make changes to this bug.