2014-09-19 07:53:05 +00:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
|
|
|
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
|
|
|
|
#include "mozilla/dom/IccInfo.h"
|
|
|
|
|
2015-01-07 11:25:22 +00:00
|
|
|
#include "mozilla/dom/icc/PIccTypes.h"
|
2014-09-19 07:53:05 +00:00
|
|
|
#include "nsPIDOMWindow.h"
|
|
|
|
|
|
|
|
#define CONVERT_STRING_TO_NULLABLE_ENUM(_string, _enumType, _enum) \
|
|
|
|
{ \
|
|
|
|
uint32_t i = 0; \
|
|
|
|
for (const EnumEntry* entry = _enumType##Values::strings; \
|
|
|
|
entry->value; \
|
|
|
|
++entry, ++i) { \
|
|
|
|
if (_string.EqualsASCII(entry->value)) { \
|
|
|
|
_enum.SetValue(static_cast<_enumType>(i)); \
|
|
|
|
} \
|
|
|
|
} \
|
|
|
|
}
|
|
|
|
|
|
|
|
using namespace mozilla::dom;
|
|
|
|
|
2015-01-07 11:25:22 +00:00
|
|
|
using mozilla::dom::icc::IccInfoData;
|
|
|
|
|
2014-09-19 07:53:05 +00:00
|
|
|
// IccInfo
|
|
|
|
|
2015-01-07 11:25:22 +00:00
|
|
|
NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(IccInfo, mWindow)
|
2014-09-19 07:53:05 +00:00
|
|
|
|
|
|
|
NS_IMPL_CYCLE_COLLECTING_ADDREF(IccInfo)
|
|
|
|
NS_IMPL_CYCLE_COLLECTING_RELEASE(IccInfo)
|
|
|
|
|
|
|
|
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(IccInfo)
|
2015-01-07 11:25:22 +00:00
|
|
|
NS_INTERFACE_MAP_ENTRY(nsIIccInfo)
|
2014-09-19 07:53:05 +00:00
|
|
|
NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
|
|
|
|
NS_INTERFACE_MAP_END
|
|
|
|
|
|
|
|
IccInfo::IccInfo(nsPIDOMWindow* aWindow)
|
|
|
|
: mWindow(aWindow)
|
|
|
|
{
|
2015-01-07 11:25:22 +00:00
|
|
|
mIccType.SetIsVoid(true);
|
|
|
|
mIccid.SetIsVoid(true);
|
|
|
|
mMcc.SetIsVoid(true);
|
|
|
|
mMnc.SetIsVoid(true);
|
|
|
|
mSpn.SetIsVoid(true);
|
|
|
|
}
|
|
|
|
|
|
|
|
IccInfo::IccInfo(const IccInfoData& aData)
|
|
|
|
{
|
|
|
|
mIccType = aData.iccType();
|
|
|
|
mIccid = aData.iccid();
|
|
|
|
mMcc = aData.mcc();
|
|
|
|
mMnc = aData.mnc();
|
|
|
|
mSpn = aData.spn();
|
|
|
|
mIsDisplayNetworkNameRequired = aData.isDisplayNetworkNameRequired();
|
|
|
|
mIsDisplaySpnRequired = aData.isDisplaySpnRequired();
|
|
|
|
}
|
|
|
|
|
|
|
|
// nsIIccInfo
|
|
|
|
|
|
|
|
NS_IMETHODIMP
|
|
|
|
IccInfo::GetIccType(nsAString & aIccType)
|
|
|
|
{
|
|
|
|
aIccType = mIccType;
|
|
|
|
return NS_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
NS_IMETHODIMP
|
|
|
|
IccInfo::GetIccid(nsAString & aIccid)
|
|
|
|
{
|
|
|
|
aIccid = mIccid;
|
|
|
|
return NS_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
NS_IMETHODIMP
|
|
|
|
IccInfo::GetMcc(nsAString & aMcc)
|
|
|
|
{
|
|
|
|
aMcc = mMcc;
|
|
|
|
return NS_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
NS_IMETHODIMP
|
|
|
|
IccInfo::GetMnc(nsAString & aMnc)
|
|
|
|
{
|
|
|
|
aMnc = mMnc;
|
|
|
|
return NS_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
NS_IMETHODIMP
|
|
|
|
IccInfo::GetSpn(nsAString & aSpn)
|
|
|
|
{
|
|
|
|
aSpn = mSpn;
|
|
|
|
return NS_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
NS_IMETHODIMP
|
|
|
|
IccInfo::GetIsDisplayNetworkNameRequired(bool *aIsDisplayNetworkNameRequired)
|
|
|
|
{
|
|
|
|
*aIsDisplayNetworkNameRequired = mIsDisplayNetworkNameRequired;
|
|
|
|
return NS_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
NS_IMETHODIMP
|
|
|
|
IccInfo::GetIsDisplaySpnRequired(bool *aIsDisplaySpnRequired)
|
|
|
|
{
|
|
|
|
*aIsDisplaySpnRequired = mIsDisplaySpnRequired;
|
|
|
|
return NS_OK;
|
2014-09-19 07:53:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
IccInfo::Update(nsIIccInfo* aInfo)
|
|
|
|
{
|
2015-01-07 11:25:22 +00:00
|
|
|
NS_ASSERTION(aInfo, "aInfo is null");
|
|
|
|
|
|
|
|
aInfo->GetIccType(mIccType);
|
|
|
|
aInfo->GetIccid(mIccid);
|
|
|
|
aInfo->GetMcc(mMcc);
|
|
|
|
aInfo->GetMnc(mMnc);
|
|
|
|
aInfo->GetSpn(mSpn);
|
|
|
|
aInfo->GetIsDisplayNetworkNameRequired(
|
|
|
|
&mIsDisplayNetworkNameRequired);
|
|
|
|
aInfo->GetIsDisplaySpnRequired(
|
|
|
|
&mIsDisplaySpnRequired);
|
2014-09-19 07:53:05 +00:00
|
|
|
}
|
|
|
|
|
2015-01-07 11:25:22 +00:00
|
|
|
// WebIDL implementation
|
|
|
|
|
2014-09-19 07:53:05 +00:00
|
|
|
JSObject*
|
Bug 1117172 part 3. Change the wrappercached WrapObject methods to allow passing in aGivenProto. r=peterv
The only manual changes here are to BindingUtils.h, BindingUtils.cpp,
Codegen.py, Element.cpp, IDBFileRequest.cpp, IDBObjectStore.cpp,
dom/workers/Navigator.cpp, WorkerPrivate.cpp, DeviceStorageRequestChild.cpp,
Notification.cpp, nsGlobalWindow.cpp, MessagePort.cpp, nsJSEnvironment.cpp,
Sandbox.cpp, XPCConvert.cpp, ExportHelpers.cpp, and DataStoreService.cpp. The
rest of this diff was generated by running the following commands:
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObjectInternal\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObjectInternal\((?:aCx|cx|aContext|aCtx|js))\)/\1, aGivenProto)/g'
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapNode\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapNode\((?:aCx|cx|aContext|aCtx|js))\)/\1, aGivenProto)/g'
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObject\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(Binding(?:_workers)?::Wrap\((?:aCx|cx|aContext|aCtx|js), [^,)]+)\)/\1, aGivenProto)/g'
2015-03-19 14:13:33 +00:00
|
|
|
IccInfo::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
|
2014-09-19 07:53:05 +00:00
|
|
|
{
|
Bug 1117172 part 3. Change the wrappercached WrapObject methods to allow passing in aGivenProto. r=peterv
The only manual changes here are to BindingUtils.h, BindingUtils.cpp,
Codegen.py, Element.cpp, IDBFileRequest.cpp, IDBObjectStore.cpp,
dom/workers/Navigator.cpp, WorkerPrivate.cpp, DeviceStorageRequestChild.cpp,
Notification.cpp, nsGlobalWindow.cpp, MessagePort.cpp, nsJSEnvironment.cpp,
Sandbox.cpp, XPCConvert.cpp, ExportHelpers.cpp, and DataStoreService.cpp. The
rest of this diff was generated by running the following commands:
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObjectInternal\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObjectInternal\((?:aCx|cx|aContext|aCtx|js))\)/\1, aGivenProto)/g'
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapNode\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapNode\((?:aCx|cx|aContext|aCtx|js))\)/\1, aGivenProto)/g'
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObject\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(Binding(?:_workers)?::Wrap\((?:aCx|cx|aContext|aCtx|js), [^,)]+)\)/\1, aGivenProto)/g'
2015-03-19 14:13:33 +00:00
|
|
|
return MozIccInfoBinding::Wrap(aCx, this, aGivenProto);
|
2014-09-19 07:53:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
Nullable<IccType>
|
|
|
|
IccInfo::GetIccType() const
|
|
|
|
{
|
|
|
|
Nullable<IccType> iccType;
|
|
|
|
|
2015-01-07 11:25:22 +00:00
|
|
|
CONVERT_STRING_TO_NULLABLE_ENUM(mIccType, IccType, iccType);
|
2014-09-19 07:53:05 +00:00
|
|
|
|
|
|
|
return iccType;
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
IccInfo::GetIccid(nsAString& aIccId) const
|
|
|
|
{
|
2015-01-07 11:25:22 +00:00
|
|
|
aIccId = mIccid;
|
2014-09-19 07:53:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
IccInfo::GetMcc(nsAString& aMcc) const
|
|
|
|
{
|
2015-01-07 11:25:22 +00:00
|
|
|
aMcc = mMcc;
|
2014-09-19 07:53:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
IccInfo::GetMnc(nsAString& aMnc) const
|
|
|
|
{
|
2015-01-07 11:25:22 +00:00
|
|
|
aMnc = mMnc;
|
2014-09-19 07:53:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
IccInfo::GetSpn(nsAString& aSpn) const
|
|
|
|
{
|
2015-01-07 11:25:22 +00:00
|
|
|
aSpn = mSpn;
|
2014-09-19 07:53:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
bool
|
|
|
|
IccInfo::IsDisplayNetworkNameRequired() const
|
|
|
|
{
|
2015-01-07 11:25:22 +00:00
|
|
|
return mIsDisplayNetworkNameRequired;
|
2014-09-19 07:53:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
bool
|
|
|
|
IccInfo::IsDisplaySpnRequired() const
|
|
|
|
{
|
2015-01-07 11:25:22 +00:00
|
|
|
return mIsDisplaySpnRequired;
|
2014-09-19 07:53:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// GsmIccInfo
|
|
|
|
|
2015-01-07 11:25:22 +00:00
|
|
|
NS_IMPL_ISUPPORTS_INHERITED(GsmIccInfo, IccInfo, nsIGsmIccInfo)
|
2015-01-07 11:25:22 +00:00
|
|
|
|
2015-03-18 18:48:52 +00:00
|
|
|
GsmIccInfo::GsmIccInfo(nsPIDOMWindow* aWindow)
|
|
|
|
: IccInfo(aWindow)
|
2015-01-07 11:25:22 +00:00
|
|
|
{
|
2015-01-07 11:25:22 +00:00
|
|
|
mPhoneNumber.SetIsVoid(true);
|
|
|
|
}
|
|
|
|
|
|
|
|
GsmIccInfo::GsmIccInfo(const IccInfoData& aData)
|
|
|
|
: IccInfo(aData)
|
|
|
|
{
|
|
|
|
mPhoneNumber = aData.phoneNumber();
|
2015-01-07 11:25:22 +00:00
|
|
|
}
|
|
|
|
|
2015-01-07 11:25:22 +00:00
|
|
|
// nsIGsmIccInfo
|
|
|
|
|
|
|
|
NS_IMETHODIMP
|
|
|
|
GsmIccInfo::GetMsisdn(nsAString & aMsisdn)
|
|
|
|
{
|
|
|
|
aMsisdn = mPhoneNumber;
|
|
|
|
return NS_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
// WebIDL implementation
|
|
|
|
|
2014-09-19 07:53:05 +00:00
|
|
|
void
|
|
|
|
GsmIccInfo::Update(nsIGsmIccInfo* aInfo)
|
|
|
|
{
|
2015-01-07 11:25:22 +00:00
|
|
|
MOZ_ASSERT(aInfo);
|
2014-10-09 17:50:37 +00:00
|
|
|
nsCOMPtr<nsIIccInfo> iccInfo = do_QueryInterface(aInfo);
|
|
|
|
MOZ_ASSERT(iccInfo);
|
|
|
|
|
|
|
|
IccInfo::Update(iccInfo);
|
2015-01-07 11:25:22 +00:00
|
|
|
|
|
|
|
aInfo->GetMsisdn(mPhoneNumber);
|
2014-09-19 07:53:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
JSObject*
|
Bug 1117172 part 3. Change the wrappercached WrapObject methods to allow passing in aGivenProto. r=peterv
The only manual changes here are to BindingUtils.h, BindingUtils.cpp,
Codegen.py, Element.cpp, IDBFileRequest.cpp, IDBObjectStore.cpp,
dom/workers/Navigator.cpp, WorkerPrivate.cpp, DeviceStorageRequestChild.cpp,
Notification.cpp, nsGlobalWindow.cpp, MessagePort.cpp, nsJSEnvironment.cpp,
Sandbox.cpp, XPCConvert.cpp, ExportHelpers.cpp, and DataStoreService.cpp. The
rest of this diff was generated by running the following commands:
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObjectInternal\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObjectInternal\((?:aCx|cx|aContext|aCtx|js))\)/\1, aGivenProto)/g'
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapNode\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapNode\((?:aCx|cx|aContext|aCtx|js))\)/\1, aGivenProto)/g'
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObject\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(Binding(?:_workers)?::Wrap\((?:aCx|cx|aContext|aCtx|js), [^,)]+)\)/\1, aGivenProto)/g'
2015-03-19 14:13:33 +00:00
|
|
|
GsmIccInfo::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
|
2014-09-19 07:53:05 +00:00
|
|
|
{
|
Bug 1117172 part 3. Change the wrappercached WrapObject methods to allow passing in aGivenProto. r=peterv
The only manual changes here are to BindingUtils.h, BindingUtils.cpp,
Codegen.py, Element.cpp, IDBFileRequest.cpp, IDBObjectStore.cpp,
dom/workers/Navigator.cpp, WorkerPrivate.cpp, DeviceStorageRequestChild.cpp,
Notification.cpp, nsGlobalWindow.cpp, MessagePort.cpp, nsJSEnvironment.cpp,
Sandbox.cpp, XPCConvert.cpp, ExportHelpers.cpp, and DataStoreService.cpp. The
rest of this diff was generated by running the following commands:
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObjectInternal\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObjectInternal\((?:aCx|cx|aContext|aCtx|js))\)/\1, aGivenProto)/g'
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapNode\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapNode\((?:aCx|cx|aContext|aCtx|js))\)/\1, aGivenProto)/g'
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObject\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(Binding(?:_workers)?::Wrap\((?:aCx|cx|aContext|aCtx|js), [^,)]+)\)/\1, aGivenProto)/g'
2015-03-19 14:13:33 +00:00
|
|
|
return MozGsmIccInfoBinding::Wrap(aCx, this, aGivenProto);
|
2014-09-19 07:53:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
GsmIccInfo::GetMsisdn(nsAString& aMsisdn) const
|
|
|
|
{
|
2015-01-07 11:25:22 +00:00
|
|
|
aMsisdn = mPhoneNumber;
|
2014-09-19 07:53:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// CdmaIccInfo
|
|
|
|
|
2015-01-07 11:25:22 +00:00
|
|
|
NS_IMPL_ISUPPORTS_INHERITED(CdmaIccInfo, IccInfo, nsICdmaIccInfo)
|
2015-01-07 11:25:22 +00:00
|
|
|
|
2015-03-18 18:48:52 +00:00
|
|
|
CdmaIccInfo::CdmaIccInfo(nsPIDOMWindow* aWindow)
|
|
|
|
: IccInfo(aWindow)
|
2015-01-07 11:25:22 +00:00
|
|
|
{
|
2015-01-07 11:25:22 +00:00
|
|
|
mPhoneNumber.SetIsVoid(true);
|
|
|
|
}
|
|
|
|
|
|
|
|
CdmaIccInfo::CdmaIccInfo(const IccInfoData& aData)
|
|
|
|
: IccInfo(aData)
|
|
|
|
{
|
|
|
|
mPhoneNumber = aData.phoneNumber();
|
|
|
|
mPrlVersion = aData.prlVersion();
|
|
|
|
}
|
|
|
|
|
|
|
|
// nsICdmaIccInfo
|
|
|
|
|
|
|
|
NS_IMETHODIMP
|
|
|
|
CdmaIccInfo::GetMdn(nsAString & aMdn)
|
|
|
|
{
|
|
|
|
aMdn = mPhoneNumber;
|
|
|
|
return NS_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
NS_IMETHODIMP
|
|
|
|
CdmaIccInfo::GetPrlVersion(int32_t *aPrlVersion)
|
|
|
|
{
|
|
|
|
*aPrlVersion = mPrlVersion;
|
|
|
|
return NS_OK;
|
2014-09-19 07:53:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
CdmaIccInfo::Update(nsICdmaIccInfo* aInfo)
|
|
|
|
{
|
2015-01-07 11:25:22 +00:00
|
|
|
MOZ_ASSERT(aInfo);
|
2014-10-09 17:50:37 +00:00
|
|
|
nsCOMPtr<nsIIccInfo> iccInfo = do_QueryInterface(aInfo);
|
|
|
|
MOZ_ASSERT(iccInfo);
|
|
|
|
|
|
|
|
IccInfo::Update(iccInfo);
|
2015-01-07 11:25:22 +00:00
|
|
|
|
|
|
|
aInfo->GetMdn(mPhoneNumber);
|
|
|
|
aInfo->GetPrlVersion(&mPrlVersion);
|
2014-09-19 07:53:05 +00:00
|
|
|
}
|
|
|
|
|
2015-01-07 11:25:22 +00:00
|
|
|
// WebIDL implementation
|
|
|
|
|
2014-09-19 07:53:05 +00:00
|
|
|
JSObject*
|
Bug 1117172 part 3. Change the wrappercached WrapObject methods to allow passing in aGivenProto. r=peterv
The only manual changes here are to BindingUtils.h, BindingUtils.cpp,
Codegen.py, Element.cpp, IDBFileRequest.cpp, IDBObjectStore.cpp,
dom/workers/Navigator.cpp, WorkerPrivate.cpp, DeviceStorageRequestChild.cpp,
Notification.cpp, nsGlobalWindow.cpp, MessagePort.cpp, nsJSEnvironment.cpp,
Sandbox.cpp, XPCConvert.cpp, ExportHelpers.cpp, and DataStoreService.cpp. The
rest of this diff was generated by running the following commands:
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObjectInternal\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObjectInternal\((?:aCx|cx|aContext|aCtx|js))\)/\1, aGivenProto)/g'
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapNode\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapNode\((?:aCx|cx|aContext|aCtx|js))\)/\1, aGivenProto)/g'
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObject\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(Binding(?:_workers)?::Wrap\((?:aCx|cx|aContext|aCtx|js), [^,)]+)\)/\1, aGivenProto)/g'
2015-03-19 14:13:33 +00:00
|
|
|
CdmaIccInfo::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
|
2014-09-19 07:53:05 +00:00
|
|
|
{
|
Bug 1117172 part 3. Change the wrappercached WrapObject methods to allow passing in aGivenProto. r=peterv
The only manual changes here are to BindingUtils.h, BindingUtils.cpp,
Codegen.py, Element.cpp, IDBFileRequest.cpp, IDBObjectStore.cpp,
dom/workers/Navigator.cpp, WorkerPrivate.cpp, DeviceStorageRequestChild.cpp,
Notification.cpp, nsGlobalWindow.cpp, MessagePort.cpp, nsJSEnvironment.cpp,
Sandbox.cpp, XPCConvert.cpp, ExportHelpers.cpp, and DataStoreService.cpp. The
rest of this diff was generated by running the following commands:
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObjectInternal\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObjectInternal\((?:aCx|cx|aContext|aCtx|js))\)/\1, aGivenProto)/g'
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapNode\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapNode\((?:aCx|cx|aContext|aCtx|js))\)/\1, aGivenProto)/g'
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObject\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(Binding(?:_workers)?::Wrap\((?:aCx|cx|aContext|aCtx|js), [^,)]+)\)/\1, aGivenProto)/g'
2015-03-19 14:13:33 +00:00
|
|
|
return MozCdmaIccInfoBinding::Wrap(aCx, this, aGivenProto);
|
2014-09-19 07:53:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
CdmaIccInfo::GetMdn(nsAString& aMdn) const
|
|
|
|
{
|
2015-01-07 11:25:22 +00:00
|
|
|
aMdn = mPhoneNumber;
|
2014-09-19 07:53:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
int32_t
|
|
|
|
CdmaIccInfo::PrlVersion() const
|
|
|
|
{
|
2015-01-07 11:25:22 +00:00
|
|
|
return mPrlVersion;
|
2014-09-19 07:53:05 +00:00
|
|
|
}
|