Bug 1114935 - Part 6.4: Migration in Payment. r=ferjmoreno

This commit is contained in:
Bevis Tseng 2015-01-15 18:34:03 +08:00
parent fa9e48c2a7
commit 465ea3221d

View File

@ -11,9 +11,9 @@ const PREF_DEBUG = "dom.payment.debug";
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
Cu.import("resource://gre/modules/Services.jsm");
XPCOMUtils.defineLazyServiceGetter(this, "iccProvider",
"@mozilla.org/ril/content-helper;1",
"nsIIccProvider");
XPCOMUtils.defineLazyServiceGetter(this, "gIccService",
"@mozilla.org/icc/iccservice;1",
"nsIIccService");
XPCOMUtils.defineLazyServiceGetter(this, "gRil",
"@mozilla.org/ril;1",
@ -148,7 +148,8 @@ PaymentProviderStrategy.prototype = {
if (!this._iccInfo) {
this._iccInfo = [];
for (let i = 0; i < gRil.numRadioInterfaces; i++) {
let info = iccProvider.getIccInfo(i);
let icc = gIccService.getIccByServiceId(i);
let info = icc && icc.iccInfo;
if (!info) {
LOGE("Tried to get the ICC info for an invalid service ID " + i);
continue;