Closed
Bug 928782
Opened 11 years ago
Closed 11 years ago
B2G RIL: "Import SIM Contact" failed after when Contact API is WebIDLized.
Categories
(Firefox OS Graveyard :: RIL, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: allstars.chh, Assigned: allstars.chh)
References
Details
Attachments
(1 file, 2 obsolete files)
(deleted),
patch
|
allstars.chh
:
review+
|
Details | Diff | Splinter Review |
STR:
Insert some SIM with some SIM contacts on it.
Contact App -> Settings -> Import Contacts -> SIM card
Now we got the following message.
10-21 11:31:42.294: E/GeckoConsole(704): [JavaScript Error: "'toJSON' called on an object that does not implement interface mozContact." {file: "jar:file:///system/b2g/omni.ja!/components/RILContentHelper.js" line: 1467}]
Assignee | ||
Comment 1•11 years ago
|
||
I'll check if it's something wrong from RIL first.
And discuss the correct way to fix this with Reuben.
Assignee: nobody → allstars.chh
Assignee | ||
Comment 2•11 years ago
|
||
Sorry I forgot to mention I have enabled the DEBUG_ALL flag in dom/system/gonk/ril_consts.js.
If I set it to false, now the Gaia part will meet this error.
10-21 14:55:02.601: E/GeckoConsole(1408): [JavaScript Error: "TypeError: Argument 1 of ContactManager.save does not implement interface mozContact." {file: "app://communications.gaiamobile.org/contacts/js/utilities/import_sim_contacts.js" line: 184}]
Assignee | ||
Comment 3•11 years ago
|
||
Now I try to remove the ObjectWrapper added from Bug 842981, now Gaia got some error.
10-21 15:36:34.602: E/GeckoConsole(1898): [JavaScript Error: "TypeError: Value being assigned to ContactField.type is not an object." {file: "app://communications.gaiamobile.org/contacts/js/utilities/import_sim_contacts.js" line: 153}]
Assignee | ||
Comment 4•11 years ago
|
||
Comment 5•11 years ago
|
||
Yes, this is incorrect usage of the mozContact interface. Comment 2 means you're trying to do something like |navigator.mozContacts.save({name: ["foo"]});| or whatever. You have to create a mozContact object first:
var c = new mozContact({name: ["foo"]});
navigator.mozContacts.save(c);
Comment 3 means you're trying to set .type to something that's incompatible with the interface (it needs to be an array of strings).
Assignee | ||
Comment 6•11 years ago
|
||
Assignee | ||
Updated•11 years ago
|
Attachment #820165 -
Flags: review?(vyang)
Updated•11 years ago
|
Attachment #820165 -
Flags: review?(vyang) → review+
Assignee | ||
Comment 7•11 years ago
|
||
rebase
Attachment #820165 -
Attachment is obsolete: true
Attachment #822148 -
Flags: review+
Assignee | ||
Comment 8•11 years ago
|
||
Seems somebody commited before me, rebase again
Attachment #822148 -
Attachment is obsolete: true
Attachment #822229 -
Flags: review+
Assignee | ||
Comment 9•11 years ago
|
||
Comment 10•11 years ago
|
||
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•