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)
Tracking
()
RESOLVED
FIXED
People
(Reporter: martijn.martijn, Assigned: martijn.martijn)
References
()
Details
Attachments
(1 file, 1 obsolete file)
|
2.09 KB,
patch
|
martijn.martijn
:
review+
|
Details | Diff | Splinter Review |
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/
| Assignee | ||
Comment 1•13 years ago
|
||
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.
Comment 2•13 years ago
|
||
(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.
| Assignee | ||
Comment 3•13 years ago
|
||
I can do that, but from what I understood, it shouldn't cause it to throw js errors anyhow.
| Assignee | ||
Comment 4•13 years ago
|
||
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
Comment 5•13 years ago
|
||
This may be related to bug 795275. I'm also getting similar errors for my b2g mochitests
| Assignee | ||
Comment 6•13 years ago
|
||
This would fix the failures in b2g, but I don't know if it would be acceptable.
Attachment #671516 -
Flags: review?(anygregor)
Comment 7•13 years ago
|
||
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+
| Assignee | ||
Comment 8•13 years ago
|
||
Oops, yes, sorry I added that.
Attachment #671516 -
Attachment is obsolete: true
Attachment #671994 -
Flags: review+
| Assignee | ||
Updated•13 years ago
|
Keywords: checkin-needed
Comment 9•13 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/0fb868c93955
Should this be [leave open] for a real fix?
| Assignee | ||
Comment 10•13 years ago
|
||
Yes, I think so, I mentioned this bug number in the patch.
Comment 12•13 years ago
|
||
Updated•12 years ago
|
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.
Description
•