Closed Bug 1649221 Opened 3 months ago Closed 3 months ago

Update ChromeUtils.generateQI callers to pass strings rather than interface objects

Categories

(Core :: XPConnect, task)

task

Tracking

()

RESOLVED FIXED
mozilla80
Tracking Status
firefox80 --- fixed

People

(Reporter: kmag, Assigned: kmag)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

ChromeUtils.generateQI accepts either strings or interface objects in its interface list. Passing interface objects, though, has the side-effect of creating a JS reflector for the interface if it doesn't already exist, which consumes unnecessary memory and CPU cycles. Passing a string, on the other hand, simply results in us looking up the nsID for the interface, and using that without any additional ado.

Pushed by maglione.k@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/e3478cefc7b0
Update ChromeUtils.generateQI callers to pass strings. r=mccr8,remote-protocol-reviewers,marionette-reviewers,perftest-reviewers,webcompat-reviewers,geckoview-reviewers,preferences-reviewers,agi,whimboo,Bebe,twisniewski
Status: NEW → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla80
You need to log in before you can comment on or make changes to this bug.