Closed
Bug 1101228
Opened 10 years ago
Closed 7 years ago
the argument passed to navigator.mozId.watch's onerror parameter callback is not an instanceof Event
Categories
(Firefox OS Graveyard :: FxA, defect)
Firefox OS Graveyard
FxA
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: nick, Unassigned)
Details
Most onXXXX event handlers are passed Event objects. onerror is passed a string!!! that the user is expected to call JSON.parse on. Not sure about the others (onlogout, onready, onlogin) but hopefully they're Event objects too and not strings.
Comment 1•10 years ago
|
||
(In reply to Nick Desaulniers [:\n] from comment #0)
> Most onXXXX event handlers are passed Event objects. onerror is passed a
> string!!! that the user is expected to call JSON.parse on. Not sure about
> the others (onlogout, onready, onlogin) but hopefully they're Event objects
> too and not strings.
The code is here:
https://github.com/mozilla/gecko-dev/blob/master/dom/identity/nsDOMIdentity.js#L544
I know we have RPs relying on the current behavior, so we might need to patch it as part of the 2.2 cycle.
Reporter | ||
Comment 2•10 years ago
|
||
Maybe `this._rpWatcher.onerror(JSON.stringify({name: msg.message.error}));` should be ` this._rpWatcher.onerror(new Event(msg.message.error));` though someone from the dom APIs team probably has a lot to say about this.
Updated•10 years ago
|
Assignee: spenrose → nobody
Comment 3•7 years ago
|
||
Firefox OS is not being worked on
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•