Closed Bug 792083 Opened 12 years ago Closed 6 years ago

Replace QIing to nsIDOMWindowUtils with SpecialPowers.getDOMWindowUtils()

Categories

(Testing :: General, defect)

10 Branch
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mccr8, Unassigned)

References

Details

This is cleaner and more future-proof. There are a bunch of tests that QI to window utils doing something like this (soon): myWindow.QueryInterface(SpecialPowers.Ci.nsIInterfaceRequestor) .getInterface(SpecialPowers.Ci.nsIDOMWindowUtils) ...which could be replaced with SpecialPowers.getDOMWindowUtils(myWindow) As a bonus, in the case where myWindow is window, we can just do SpecialPowers.DOMWindowUtils. There are some getDOMWindowUtils(window) in the tree already, I think, that we might as well replace at the same time. This depends on bug 792036 entirely because I don't want to bitrot Bobby's giant patch. That bug also has a script that we could probably use to base a script for this bug on.
Thanks for filing the bug. :-) I'm pretty adept at this sort of thing, so I can probably put this patch together pretty quick. Ping me once the other stuff settles if I forget about this bug?
Bug 649124 got lost in a lot of really weird test failures. Hopefully this one fares better!
(In reply to Josh Matthews [:jdm] from comment #2) > Bug 649124 got lost in a lot of really weird test failures. Hopefully this > one fares better! Looking over the patch there, at least one problem is that places that got DWU from an iframe was being converted to getting DWU from the window. There were also a few other oddnesses in there.
Depends on: 979161
(In reply to Andrew McCreight [:mccr8] from comment #3) > (In reply to Josh Matthews [:jdm] from comment #2) > > Bug 649124 got lost in a lot of really weird test failures. Hopefully this > > one fares better! > > Looking over the patch there, at least one problem is that places that got > DWU from an iframe was being converted to getting DWU from the window. There > were also a few other oddnesses in there. Now that bug 979161 has landed, the above issue should be fixed. Is it worth revisiting this bug now?
Flags: needinfo?(continuation)
I think peterv is looking into this, because his work on WebIDL bindings for DOM windows is going to get rid of QI on window, or something like that. I'm not sure how far along he is.
Flags: needinfo?(continuation)
Depends on: 984497
Depends on: 1476145
Fixed by bug 1476145.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.