Bug 1387791 - Remove [deprecated] Components.reportError. r?bholley
MozReview-Commit-ID: CCqFQid7ZDi
--- a/js/xpconnect/idl/xpccomponents.idl
+++ b/js/xpconnect/idl/xpccomponents.idl
@@ -725,12 +725,9 @@ interface nsIXPCComponents : nsIXPCCompo
readonly attribute nsIXPCComponents_ID ID;
readonly attribute nsIXPCComponents_Exception Exception;
readonly attribute nsIXPCComponents_Constructor Constructor;
[implicit_jscontext]
// A javascript component can set |returnCode| to specify an nsresult to
// be returned without throwing an exception.
attribute jsval returnCode;
-
- /* @deprecated Use Components.utils.reportError instead. */
- [deprecated, implicit_jscontext] void reportError(in jsval error);
};
--- a/js/xpconnect/src/XPCComponents.cpp
+++ b/js/xpconnect/src/XPCComponents.cpp
@@ -3484,29 +3484,16 @@ nsXPCComponents::SetReturnCode(JSContext
{
nsresult rv;
if (!ToUint32(aCx, aCode, (uint32_t*)&rv))
return NS_ERROR_FAILURE;
XPCJSContext::Get()->SetPendingResult(rv);
return NS_OK;
}
-// static
-NS_IMETHODIMP nsXPCComponents::ReportError(HandleValue error, JSContext* cx)
-{
- NS_WARNING("Components.reportError deprecated, use Components.utils.reportError");
-
- nsCOMPtr<nsIXPCComponents_Utils> utils;
- nsresult rv = GetUtils(getter_AddRefs(utils));
- if (NS_FAILED(rv))
- return rv;
-
- return utils->ReportError(error, cx);
-}
-
/**********************************************/
class ComponentsSH : public nsIXPCScriptable
{
public:
explicit constexpr ComponentsSH(unsigned dummy)
{
}