Bug 1435483 part 13. Remove nsIException::GetName. r=qdot

MozReview-Commit-ID: CXnwjeHoGRm
This commit is contained in:
Boris Zbarsky
2018-02-05 16:34:05 -05:00
parent 3d3eafa0e5
commit 1fcbdd4ee4
3 changed files with 6 additions and 22 deletions

View File

@@ -244,11 +244,11 @@ Exception::GetResult(nsresult* aResult)
return NS_OK;
}
NS_IMETHODIMP
Exception::GetName(nsACString& aName)
void
Exception::GetName(nsAString& aName)
{
if (!mName.IsEmpty()) {
aName.Assign(mName);
CopyUTF8toUTF16(mName, aName);
} else {
aName.Truncate();
@@ -256,11 +256,9 @@ Exception::GetName(nsACString& aName)
nsXPCException::NameAndFormatForNSResult(mResult, &name, nullptr);
if (name) {
aName.Assign(name);
CopyUTF8toUTF16(name, aName);
}
}
return NS_OK;
}
NS_IMETHODIMP
@@ -380,18 +378,6 @@ Exception::Result() const
return (uint32_t)mResult;
}
void
Exception::GetName(nsString& retval)
{
nsCString str;
#ifdef DEBUG
DebugOnly<nsresult> rv =
#endif
GetName(str);
MOZ_ASSERT(NS_SUCCEEDED(rv));
CopyUTF8toUTF16(str, retval);
}
uint32_t
Exception::LineNumber(JSContext* aCx) const
{