Bug 1174954 part 2. Remove the special-casing of DOMError in JS-implemented webidl code. r=bholley

This commit is contained in:
Boris Zbarsky 2015-06-16 16:44:11 -04:00
Родитель bdea574c3c
Коммит d8e0256e6d
1 изменённых файлов: 2 добавлений и 19 удалений

Просмотреть файл

@ -282,25 +282,8 @@ ErrorResult::ReportJSExceptionFromJSImplementation(JSContext* aCx)
MOZ_ASSERT(!mMightHaveUnreportedJSException,
"Why didn't you tell us you planned to handle JS exceptions?");
// Check for a DOMError, since we convert that into an Error in the content
// compartment. We can probably remove that now; see bug 1174954.
dom::DOMError* domError;
nsresult rv = UNWRAP_OBJECT(DOMError, &mJSException.toObject(), domError);
if (NS_FAILED(rv)) {
// Just report it.
ReportJSException(aCx);
return;
}
nsString message;
domError->GetMessage(message);
JS_ReportError(aCx, "%hs", message.get());
js::RemoveRawValueRoot(aCx, &mJSException);
// We no longer have a useful exception but we do want to signal that an error
// occured.
mResult = NS_ERROR_FAILURE;
// Just report it.
ReportJSException(aCx);
}
void