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

RESOLVED WORKSFORME

Status

RESOLVED WORKSFORME
6 years ago
5 years ago

People

(Reporter: jmcf, Unassigned)

Tracking

unspecified
x86
Mac OS X

Firefox Tracking Flags

(blocking-basecamp:-)

Details

(Reporter)

Description

6 years ago
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.
(Reporter)

Updated

6 years ago
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
(Reporter)

Comment 1

6 years ago
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.
(Reporter)

Comment 3

6 years ago
Well actually it is needed and used in Gaia

Comment 4

6 years ago
We could take a patch for this, but doesn't block because the consequences are minor.
blocking-basecamp: ? → -
(Reporter)

Comment 5

5 years ago
Reuben,

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