Bumping manifests a=b2g-bump
[gecko.git] / dom / icc / IccCardLockError.cpp
blob6bad24f7c2e8a9b58cf0dc7856c8960868e2e9c0
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"
8 namespace mozilla {
9 namespace dom {
11 NS_IMPL_ISUPPORTS_INHERITED0(IccCardLockError, DOMError)
13 /* static */ already_AddRefed<IccCardLockError>
14 IccCardLockError::Constructor(const GlobalObject& aGlobal,
15 const nsAString& aName,
16 int16_t aRetryCount,
17 ErrorResult& aRv)
19 nsCOMPtr<nsPIDOMWindow> window = do_QueryInterface(aGlobal.GetAsSupports());
20 if (!window) {
21 aRv.Throw(NS_ERROR_FAILURE);
22 return nullptr;
25 nsRefPtr<IccCardLockError> result =
26 new IccCardLockError(window, aName, aRetryCount);
27 return result.forget();
30 IccCardLockError::IccCardLockError(nsPIDOMWindow* aWindow,
31 const nsAString& aName,
32 int16_t aRetryCount)
33 : DOMError(aWindow, aName)
34 , mRetryCount(aRetryCount)
38 JSObject*
39 IccCardLockError::WrapObject(JSContext* aCx)
41 return IccCardLockErrorBinding::Wrap(aCx, this);
44 } // namespace dom
45 } // namespace mozilla