Closed Bug 792594 Opened 13 years ago Closed 12 years ago

comp.utils.import("resource://gre/modules/ContactService.jsm") throws NS_ERROR_XPC_GS_RETURNED_FAILURE error in mochitest b2g

Categories

(Core :: DOM: Device Interfaces, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: martijn.martijn, Assigned: martijn.martijn)

References

()

Details

Attachments

(1 file, 1 obsolete file)

While doing this piece of code in mochitest b2g: var comp = SpecialPowers.wrap(Components); comp.utils.import("resource://gre/modules/ContactService.jsm"); I got this error: 3 ERROR TEST-UNEXPECTED-FAIL | /tests/dom/tests/mochitest/webapi-smoke-sprint/test_contacts_basics_simple.html | an unexpected uncaught JS exception reported through window.onerror - NS_ERROR_XPC_GS_RETURNED_FAILURE: Component returned failure code: 0x80570016 (NS_ERROR_XPC_GS_RETURNED_FAILURE) [nsIJSCID.getService] at resource://gre/modules/XPCOMUtils.jsm:198 This ContactService.jsm component import is being done by the contacts mochitests, so these tests would fail with this error in mochitest b2g. http://mxr.mozilla.org/mozilla-central/source/dom/contacts/tests/
Btw, on b2g this ContactService.jsm component import isn't necessary, because that is already done (I guess here: http://mxr.mozilla.org/mozilla-central/source/b2g/chrome/content/shell.js#14 ). But this component import is needed for mochitests on Firefox desktop.
(In reply to Martijn Wargers [:mw22] (QA - IRC nick: mw22) from comment #1) > Btw, on b2g this ContactService.jsm component import isn't necessary, > because that is already done (I guess here: > http://mxr.mozilla.org/mozilla-central/source/b2g/chrome/content/shell.js#14 > ). > But this component import is needed for mochitests on Firefox desktop. Right, it is only needed for desktop mochitests. Don't import it for b2g builds.
I can do that, but from what I understood, it shouldn't cause it to throw js errors anyhow.
For now, I use myself 'if (!SpecialPowers.getBoolPref("dom.mozContacts.enabled"))' to workaround this issue. Gregor on irc: [18:46] <gwagner_> mw22: it might be because it is already loaded in the parent process [18:47] <gwagner_> mw22: and it should only be loaded in the parent. but the message manager might get confused if you try to load it in the child as well
This may be related to bug 795275. I'm also getting similar errors for my b2g mochitests
Attached patch fix for now? (obsolete) — Splinter Review
This would fix the failures in b2g, but I don't know if it would be acceptable.
Attachment #671516 - Flags: review?(anygregor)
Comment on attachment 671516 [details] [diff] [review] fix for now? >diff --git a/dom/tests/mochitest/Makefile.in b/dom/tests/mochitest/Makefile.in >index 5de9321..f49fa15 100644 >--- a/dom/tests/mochitest/Makefile.in >+++ b/dom/tests/mochitest/Makefile.in >@@ -27,6 +27,7 @@ DIRS += \ > storageevent \ > pointerlock \ > webapps \ >+ webapi-smoke-sprint \ Remove? I don't really like this fix but I can't think of anything better right now. Lets try it.
Attachment #671516 - Flags: review?(anygregor) → review+
Attached patch fix for nowSplinter Review
Oops, yes, sorry I added that.
Attachment #671516 - Attachment is obsolete: true
Attachment #671994 - Flags: review+
Keywords: checkin-needed
Assignee: nobody → martijn.martijn
Flags: in-testsuite-
Keywords: checkin-needed
Yes, I think so, I mentioned this bug number in the patch.
you can add it yourself, you know ;)
Whiteboard: [leave open]
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Whiteboard: [leave open]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: