Closed
Bug 1330167
Opened 8 years ago
Closed 8 years ago
cookies.CookieStore.tabIds is an array of Tabs, should be an array of tab IDs
Categories
(WebExtensions :: General, defect)
WebExtensions
General
Tracking
(firefox53 fixed)
RESOLVED
FIXED
mozilla53
Tracking | Status | |
---|---|---|
firefox53 | --- | fixed |
People
(Reporter: wbamberg, Assigned: zombie)
References
Details
Attachments
(2 files)
I've attached an example, which contains a background script like this:
function logStores(cookieStores) {
for(store of cookieStores) {
console.log(`Cookie store: ${store.id}\n Tab IDs:`, store.tabIds);
}
}
function listCookieStores() {
var getting = chrome.cookies.getAllCookieStores(logStores);
}
chrome.browserAction.onClicked.addListener(listCookieStores);
It gets all cookie stores, and logs each store's id and tabIds property. According to the docs (https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/Cookies/CookieStore), tabIds is an array of integers, where each integer is a Tab ID.
In Chrome, this is what you get. In Firefox, you get an array of Tab objects.
Comment hidden (mozreview-request) |
Assignee | ||
Updated•8 years ago
|
Assignee: nobody → tomica
Status: NEW → ASSIGNED
Assignee | ||
Updated•8 years ago
|
Attachment #8826547 -
Flags: review?(aswan)
Comment 2•8 years ago
|
||
mozreview-review |
Comment on attachment 8826547 [details]
Bug 1330167 - CookieStore.tabIds should be an array of tab IDs
https://reviewboard.mozilla.org/r/104502/#review105206
::: toolkit/components/extensions/ext-cookies.js:425
(Diff revision 1)
> let tabs = TabManager.for(extension).getTabs(window);
> for (let tab of tabs) {
> if (!(tab.cookieStoreId in data)) {
> data[tab.cookieStoreId] = [];
> }
> - data[tab.cookieStoreId].push(tab);
> + data[tab.cookieStoreId].push(tab.id);
> }
This builds up a whole extension-facing Tab object for each tab only to discard everything except the id and the cookieStoreId. But glancing through the code, I don't see any obvious way to address that without making much bigger changes than this really warrants...
Attachment #8826547 -
Flags: review?(aswan) → review+
Assignee | ||
Comment 3•8 years ago
|
||
mozreview-review-reply |
Comment on attachment 8826547 [details]
Bug 1330167 - CookieStore.tabIds should be an array of tab IDs
https://reviewboard.mozilla.org/r/104502/#review105206
> This builds up a whole extension-facing Tab object for each tab only to discard everything except the id and the cookieStoreId. But glancing through the code, I don't see any obvious way to address that without making much bigger changes than this really warrants...
*nod*
Assignee | ||
Updated•8 years ago
|
Keywords: checkin-needed
Comment 4•8 years ago
|
||
Autoland can't push this due to unresolved issues in MozReview.
Keywords: checkin-needed
Assignee | ||
Comment 5•8 years ago
|
||
My bad. It's almost invisible in the new design. :/
Keywords: checkin-needed
Pushed by ihsiao@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/b540a38f365f
CookieStore.tabIds should be an array of tab IDs r=aswan
Keywords: checkin-needed
Comment 7•8 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
status-firefox53:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla53
Updated•7 years ago
|
Product: Toolkit → WebExtensions
You need to log in
before you can comment on or make changes to this bug.
Description
•