Closed Bug 1391168 Opened 7 years ago Closed 7 years ago

Tab mutedInfo uses URL UUID rather than internal ID

Categories

(WebExtensions :: Frontend, defect, P2)

57 Branch
defect

Tracking

(firefox57 fixed)

RESOLVED FIXED
mozilla57
Tracking Status
firefox57 --- fixed

People

(Reporter: ljbousfield, Assigned: ljbousfield)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/57.0
Build ID: 20170810100255

Steps to reproduce:

Create a webextension (or use the debugger of an existing webextension) to run the following code:

chrome.tabs.create({}, x => {chrome.tabs.update(x.id, {muted:true});console.log(chrome.tabs.get(x.id, y => console.log(y.mutedInfo.extensionId)))})

In short, the code creates a tab, mutes it, then logs `tab.mutedInfo.extensionId`.


Actual results:

The extension's internal UUID was logged.


Expected results:

The extension's ID, as specified by chrome.runtime.id or browser.runtime.id, should have been logged.
Component: Untriaged → WebExtensions: Frontend
Product: Firefox → Toolkit
This is intentional.
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Resolution: --- → INVALID
In Chrome, the ID outputted is the same as chrome.browser.id. At the least, this is an incompatibility with the chrome API. Can I ask why this design decision was made? Maybe privacy? In my use case, I'd like to check if my extension muted the tab. I figure this is a primary use case for `mutedInfo.extensionId`. However, I don't see a good way to get the internal UUID with the current API (the best I can do is `browser.i18n.getMessage("@@extension_id")`).
Ah, I see what you're saying now.
Status: RESOLVED → REOPENED
Ever confirmed: true
Resolution: INVALID → ---
Summary: Webextension tab mutedInfo API uses internal extension UUID → Tab mutedInfo uses URL UUID rather than internal ID
Attachment #8898601 - Flags: review?(kmaglione+bmo)
Priority: -- → P2
Comment on attachment 8898601 [details]
Use extension ID instead of URL UUID for tab.mutedInfo (bug 1391168)

https://reviewboard.mozilla.org/r/169992/#review178138

Thanks, and sorry for the delay!
Attachment #8898601 - Flags: review?(kmaglione+bmo) → review+
Once you've got r+ on a bug, like this, you need to add checkin-needed to the keywords, a sheriff will come a long and try to commit it for you. I've done this on your behalf so we can get this landed. Thanks for your patch!
Keywords: checkin-needed
Okay. It's worth noting that I did get a try build, but it looks like it failed due to an unrelated build system issue: https://treeherder.mozilla.org/#/jobs?repo=try&revision=3ef17167ed7d
(In reply to ljbousfield from comment #7)
> Okay. It's worth noting that I did get a try build, but it looks like it
> failed due to an unrelated build system issue:
> https://treeherder.mozilla.org/#/jobs?repo=try&revision=3ef17167ed7d

It looks like there was an infrastructure failure. I triggered a new try run.
Assignee: nobody → ljbousfield
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/5dac54fb0d76
Use extension ID instead of URL UUID for tab.mutedInfo r=kmag
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/5dac54fb0d76
Status: REOPENED → RESOLVED
Closed: 7 years ago7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
Thanks so much, ljbousfield! Welcome onboard. Your contribution has been added to our recognition wiki: https://wiki.mozilla.org/Add-ons/Contribute/Recognition#September_2017

If you'd like to create a profile on mozillians.org, I'd be happy to vouch for you.
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: