зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1065185 - Create a content Array rather than a chrome array when reading Icc contacts. r=hsinyi
Right now, this array gets implicit __exposedProps__ for all of its indexed members (and .length). Instead, we should be creating the Array directly in the target Window.
This commit is contained in:
Родитель
f4c38cee30
Коммит
6e48726329
|
@ -799,7 +799,8 @@ RILContentHelper.prototype = {
|
|||
let window = this._windowsMap[message.requestId];
|
||||
delete this._windowsMap[message.requestId];
|
||||
let contacts = message.contacts;
|
||||
let result = contacts.map(function(c) {
|
||||
let result = new window.Array();
|
||||
contacts.forEach(function(c) {
|
||||
let prop = {name: [c.alphaId], tel: [{value: c.number}]};
|
||||
|
||||
if (c.email) {
|
||||
|
@ -814,7 +815,7 @@ RILContentHelper.prototype = {
|
|||
|
||||
let contact = new window.mozContact(prop);
|
||||
contact.id = c.contactId;
|
||||
return contact;
|
||||
result.push(contact);
|
||||
});
|
||||
|
||||
this.fireRequestSuccess(message.requestId, result);
|
||||
|
|
Загрузка…
Ссылка в новой задаче