Closed Bug 814368 Opened 12 years ago Closed 11 years ago

mozContacts.remove invokes on success if you pass an object which is not actually a mozContact

Categories

(Firefox OS Graveyard :: General, defect)

x86
macOS
defect
Not set
normal

Tracking

(blocking-basecamp:-)

RESOLVED WORKSFORME
blocking-basecamp -

People

(Reporter: jmcf, Unassigned)

Details

Call navigator.mozContacts.remove with a non empty JS object which is not a mozContact object. The DOMRequest.onsuccess is called, which is wrong. The onerror callback should be invoked instead. This actually misleads developers.
Summary: mozContacts.remove invokes on success even if you pass an object which is not even a mozContact → mozContacts.remove invokes on success if you pass an object which is not actually a mozContact
IMHO this should be nominated to blocking basecamp as it affects developers experience
blocking-basecamp: --- → ?
I'm not sure if sending an error event would really help. I'm not sure if having DOMRequest for removal is generally a good idea actually.
Well actually it is needed and used in Gaia
We could take a patch for this, but doesn't block because the consequences are minor.
blocking-basecamp: ? → -
Reuben,

With the recent WebIDL changes, is this bug still valid?
Flags: needinfo?(reuben.bmo)
Nope, I don't think so.
Status: NEW → RESOLVED
Closed: 11 years ago
Flags: needinfo?(reuben.bmo)
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.