Closed
Bug 1418410
Opened 8 years ago
Closed 7 years ago
tabs.query() ignores the "discarded" queryInfo property
Categories
(WebExtensions :: Frontend, defect, P3)
Tracking
(firefox59 fixed)
RESOLVED
FIXED
| Tracking | Status | |
|---|---|---|
| firefox59 | --- | fixed |
People
(Reporter: benedikt.morbach, Unassigned)
References
Details
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:59.0) Gecko/20100101 Firefox/59.0
Build ID: 20171117100127
Steps to reproduce:
I call `browser.tabs.query({discarded: false});` to get all non-discarded tabs.
Minimal example webextension (needs "tabs" permission):
function forallDiscardable(func) {
var discardable = browser.tabs.query({discarded: false});
discardable.then((tabs) => {
for (let tab of tabs) {
console.log("forall", tab.discarded, tab.url);
func(tab);
}
});
}
forallDiscardable((tab) => {});
Tested on Firefox nightly 59.0a1 (2017-11-17).
Actual results:
All tabs are logged to console.log, most of which with the discarded state "true", as I ran this in a recently restored session.
Expected results:
Only the couple of tabs that have been active since the session was restored should be returned by the query.
Updated•8 years ago
|
Priority: -- → P3
Status: UNCONFIRMED → NEW
Has STR: --- → yes
status-firefox57:
--- → wontfix
status-firefox58:
--- → affected
status-firefox59:
--- → affected
Ever confirmed: true
OS: Unspecified → All
Hardware: Unspecified → All
Version: Trunk → 57 Branch
Comment 1•7 years ago
|
||
Yeah, the discarded getter was implemented but matches() didn't use it. This was fixed in bug 1423725.
Updated•7 years ago
|
Product: Toolkit → WebExtensions
Updated•7 years ago
|
status-firefox57:
wontfix → ---
status-firefox58:
wontfix → ---
You need to log in
before you can comment on or make changes to this bug.
Description
•