Closed Bug 915014 Opened 11 years ago Closed 11 years ago

"Ci is not defined" during B2G desktop mochitests

Categories

(Testing :: Mochitest, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla26

People

(Reporter: jgriffin, Assigned: jgriffin)

Details

Attachments

(1 file)

When running mochitests on B2G desktop builds, we get the following error: System JS : ERROR chrome://specialpowers/content/SpecialPowersObserverAPI.js:102 ReferenceError: Ci is not defined This has to do with B2G compartment sharing and not inheriting the definition of Ci from the parent context.
Attached patch Define CISplinter Review
Attachment #802843 - Flags: review?(jmaher)
Comment on attachment 802843 [details] [diff] [review] Define CI Review of attachment 802843 [details] [diff] [review]: ----------------------------------------------------------------- ::: testing/specialpowers/content/SpecialPowersObserverAPI.js @@ +5,5 @@ > Components.utils.import("resource://gre/modules/Services.jsm"); > > +if (typeof(Ci) == 'undefined') { > + const Ci = Components.interfaces; > +} I recall an issue in the past where detecting this for CC required a try/catch. If you have tested this and it works for the case where it was undefined, then all is well.
Attachment #802843 - Flags: review?(jmaher) → review+
Yep it works, thanks.
Last try job was causing some "redefinition of Ci" errors on desktop; here's a new one that passes for me locally: https://tbpl.mozilla.org/?tree=Try&rev=3b1351ba4e4f
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: