Bug 913855. Fix consumers of window mediator to be more consistent in their checking for closed windows. r=dolske
Note that we can't just stop returning closed windows from the window mediator, because some consumers (e.g. session restore) rely on seeing closed windows in the list so they can remove them from their internal data structures expeditiouly.
This commit is contained in:
@@ -297,6 +297,7 @@ function windows(type, options) {
|
||||
let window = winEnum.getNext().QueryInterface(Ci.nsIDOMWindow);
|
||||
// Only add non-private windows when pb permission isn't set,
|
||||
// unless an option forces the addition of them.
|
||||
// XXXbz should this be checking window.closed?
|
||||
if (options.includePrivate || !isWindowPrivate(window)) {
|
||||
list.push(window);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user