Closed Bug 1129650 Opened 5 years ago Closed 5 years ago

Touching navigator.mozId causes an error NS_ERROR_FACTORY_NOT_REGISTERED


(Firefox for Android :: General, defect)

38 Branch
Not set



Firefox 39
Tracking Status
firefox39 --- fixed


(Reporter: scolville, Assigned: ferjm)




(1 file, 2 obsolete files)

In payments we look to see if navigator.mozId is defined to know if nativeFxA is available.

In FF Android nightly 38.0a1 (2015-02-04) this causes a JS error:

W/GeckoConsole( 8958): [JavaScript Error: "NS_ERROR_FACTORY_NOT_REGISTERED: " {file: "" line: 19}]

Here's a test-case:
Any ideas Sam?
Flags: needinfo?(spenrose)
This means that the WebIDL machinery doesn't like its mozId implementation on Android. You can find a WebIDL savant to determine what's going on, or simply skip the check on Android (since mozId won't work on that platform).
Flags: needinfo?(spenrose)
Thanks, ferjm is our WebIDL savant.
Flags: needinfo?(ferjmoreno)
We don't support mozId on Android, so we shouldn't be exposing it.
Flags: needinfo?(ferjmoreno)
Assignee: nobody → ferjmoreno
Attached patch v1 (obsolete) — Splinter Review
Not sure if this is the right approach, but let's give it a try.
Attached patch v2 (obsolete) — Splinter Review
Ok, that didn't work.

It seems that we exposed for Desktop on bug 753239. Not sure why, but I believe we don't need to do that. Matt, Sam, do you know if there is any reason for exposing in Desktop?

Second try removing mozId stuff from Desktop
Attachment #8561492 - Attachment is obsolete: true
Flags: needinfo?(spenrose)
Flags: needinfo?(MattN+bmo) was initially written for Persona, and its possible we wanted the option of a native implementation for desktop. That option is no longer viable, and we should certainly hide it, if not remove it.
Flags: needinfo?(spenrose)
Comment on attachment 8561954 [details] [diff] [review]

Review of attachment 8561954 [details] [diff] [review]:

Yeah, this was for native BrowserID but it's already broken and we should remove it so it's fine to not build it.
Attachment #8561954 - Flags: feedback+
Flags: needinfo?(MattN+bmo)
Attached patch v3Splinter Review
Thanks Matthew!

Andrea, this patch avoids exposing navigator.mozId on desktop and android, but it still exposes it on b2g.
Attachment #8568514 - Flags: review?(amarchesini)
Attachment #8561954 - Flags: feedback+
Attachment #8568514 - Flags: review?(amarchesini) → review+
Attachment #8561954 - Attachment is obsolete: true
Backed out for hitting intermittent OSX packaging failures.

07:13:57 INFO - Error: /builds/slave/m-in-osx64-0000000000000000000/build/src/obj-firefox/i386/browser/installer/package-manifest:455: File missing in ../../dist:
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 39
You need to log in before you can comment on or make changes to this bug.