1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
3 * You can obtain one at http://mozilla.org/MPL/2.0/. */
5 #include "mozilla/dom/IccCardLockError.h"
6 #include "mozilla/dom/IccCardLockErrorBinding.h"
11 NS_IMPL_ISUPPORTS_INHERITED0(IccCardLockError
, DOMError
)
13 /* static */ already_AddRefed
<IccCardLockError
>
14 IccCardLockError::Constructor(const GlobalObject
& aGlobal
,
15 const nsAString
& aName
,
19 nsCOMPtr
<nsPIDOMWindow
> window
= do_QueryInterface(aGlobal
.GetAsSupports());
21 aRv
.Throw(NS_ERROR_FAILURE
);
25 nsRefPtr
<IccCardLockError
> result
=
26 new IccCardLockError(window
, aName
, aRetryCount
);
27 return result
.forget();
30 IccCardLockError::IccCardLockError(nsPIDOMWindow
* aWindow
,
31 const nsAString
& aName
,
33 : DOMError(aWindow
, aName
)
34 , mRetryCount(aRetryCount
)
39 IccCardLockError::WrapObject(JSContext
* aCx
)
41 return IccCardLockErrorBinding::Wrap(aCx
, this);
45 } // namespace mozilla