All Jetpack and Devtools test suites are going to permafail when Gecko 48 merges to Beta (resource://devtools/client/framework/about-devtools-toolbox.js:45 - TypeError: Cm.isCIDRegistered is not a function)

RESOLVED FIXED in Firefox 48

Status

()

Firefox
Developer Tools: Framework
--
critical
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: RyanVM, Assigned: ochameau)

Tracking

Trunk
Firefox 48
Points:
---

Firefox Tracking Flags

(firefox46 unaffected, firefox47 unaffected, firefox48blocking fixed)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

2 years ago
[Tracking Requested - why for this release]: Mass devtools test bustage when Gecko 48 merges to Beta.

https://treeherder.mozilla.org/logviewer.html#?job_id=18725820&repo=try
Flags: needinfo?(poirot.alex)
(Reporter)

Updated

2 years ago
Summary: All devtools tests are going to permafail when Gecko 48 merges to Beta (resource://devtools/client/framework/about-devtools-toolbox.js:45 - TypeError: Cm.isCIDRegistered is not a function) → All Jetpack and Devtools test suites are going to permafail when Gecko 48 merges to Beta (resource://devtools/client/framework/about-devtools-toolbox.js:45 - TypeError: Cm.isCIDRegistered is not a function)
devtools/about-devtools-toolbox.js uses |Cm.isCIDRegistered| as a function, where |Cm| is defined as:
const { Ci, Cu, Cm, components } = require("chrome");

I don't know much about this, but testing quickly locally in scratchpad, I always find isCIDRegistered to be undefined...

However, this seems to work for me:

let registrar = Cm.QueryInterface(Ci.nsIComponentRegistrar);
registrar.isCIDRegistered

I hope this helps.
(Assignee)

Comment 2

2 years ago
I'm always surprised to see things being broken only after merges.
Is it due to just preference differences or is there some code difference ?!?

I imagine we can reproduce this issue with mozilla-central but with some tweaks in mozconfig to ask for a beta build?

(In reply to Patrick Brosset [:pbro] from comment #1)
> devtools/about-devtools-toolbox.js uses |Cm.isCIDRegistered| as a function,
> where |Cm| is defined as:
> const { Ci, Cu, Cm, components } = require("chrome");
> 
> I don't know much about this, but testing quickly locally in scratchpad, I
> always find isCIDRegistered to be undefined...
> 
> However, this seems to work for me:
> 
> let registrar = Cm.QueryInterface(Ci.nsIComponentRegistrar);
> registrar.isCIDRegistered
> 

Yes, that makes sense, Cm isn't necessarely "interfaced" to nsIComponentRegistrar, I imagine with beta prefs we disable some code that does it before about-devtools-toolbox.js...
Flags: needinfo?(poirot.alex)
(Assignee)

Comment 3

2 years ago
Created attachment 8737134 [details] [diff] [review]
patch
Attachment #8737134 - Flags: review?(jryans)
Comment on attachment 8737134 [details] [diff] [review]
patch

Review of attachment 8737134 [details] [diff] [review]:
-----------------------------------------------------------------

I think the "usual" way is to use the return value of the QI call to call whatever method is needed, as in:

https://dxr.mozilla.org/mozilla-central/source/js/xpconnect/tests/unit/test_xpcomutils.js#141

and many others.  Can you do that for this case?
Attachment #8737134 - Flags: review?(jryans)
(Assignee)

Comment 6

2 years ago
Created attachment 8737167 [details] [diff] [review]
patch v2

Per QueryInterface behavior, it shouldn't be necessary.
But it is surprising to see so many usage where only the result of QI is used.
Attachment #8737167 - Flags: review?(jryans)
(Assignee)

Updated

2 years ago
Attachment #8737134 - Attachment is obsolete: true
Attachment #8737167 - Flags: review?(jryans) → review+
(Reporter)

Comment 9

2 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/fd4ef6fe328c
Status: NEW → RESOLVED
Last Resolved: 2 years ago
status-firefox48: affected → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 48
Ryan, just noticing that the target milestone is 48 but this landed in m-c (49) Does anything need uplift here?   
For your permafail bugs in general, I'll mark them as blockers.
tracking-firefox48: ? → blocking
^^
Flags: needinfo?(ryanvm)
(Reporter)

Comment 12

2 years ago
It landed on m-c prior to Gecko 48 merging to Aurora, so we're good.
Assignee: nobody → poirot.alex
Flags: needinfo?(ryanvm)
You need to log in before you can comment on or make changes to this bug.