Closed Bug 1606862 Opened 4 years ago Closed 4 years ago

Make devtools an optional permission


(WebExtensions :: General, enhancement, P1)

71 Branch


(firefox77 fixed)

Tracking Status
firefox77 --- fixed


(Reporter: mbugzillam, Assigned: mixedpuppy)


(Blocks 1 open bug)


(Keywords: dev-doc-complete)


(1 file)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:71.0) Gecko/20100101 Firefox/71.0

Steps to reproduce:

This is a request to make DevTools access an optional permission.

Currently the only way to request DevTools access is to specify devtools_page in the manifest, which results in a permissions warning at install time. This is a shame, as only a subset of the users of the extension I maintain would actually need to use the DevTools part of it, and I'd like people to be able to install the extension without any warnings.

Thanks for your time in considering this. Context and related issues can be found below.

// Background

I maintain an extension that helps people navigate with the keyboard, via landmark regions [0]. It also contains a DevTools panel to help web-devs understand how their code relates to the landmarks on their pages.

Whilst the extension needs to run on every page (in order to tell the user how many landmarks there are via the browserAction badge), I've been experimenting with requesting <all_urls> at runtime, so that it doesn't require any permissions to install.

Unfortunately because the only way to request the DevTools permission is to set devtools_page in the manifest, the user is always required to authorise it, even if they aren't going to actually use it.

// Related issues

There are several other issues that ask for permissions to be made optional:

  • Bug 1458585: Allow more permissions to be used as an optional permission [doesn't mention DevTools in the thread, but the submitted patch did include it, though I am not sure if the patch was taken forward]
  • Bug 1459941: Let geolocation be an optional permission
  • Bug 1548011: Make proxy an optional permission
  • Bug 1386673: Make Contextual Identity extensions be an optional permission
  • Bug 1399109: Add management as an optional permission


Blocks: 1458585
Priority: -- → P3
Priority: P3 → P1
Assignee: nobody → mixedpuppy
Pushed by
support devtools as an optional extension permission r=rpl
Pushed by
support devtools as an optional extension permission r=rpl

Backed out changeset 8a0b81f6263e (Bug 1606862) for causing devtools failures at devtools/client/framework/test/browser_toolbox_toolbar_reorder_with_extension.js

Push with failure:

Failure log:

Backout link:

[task 2020-04-30T02:42:07.785Z] 02:42:07     INFO - Not taking screenshot here: see the one that was previously logged
[task 2020-04-30T02:42:07.787Z] 02:42:07     INFO - TEST-UNEXPECTED-FAIL | devtools/client/framework/test/browser_toolbox_toolbar_reorder_with_extension.js | no tasks awaiting on messages - Got ["devtools-page-ready"], expected []
[task 2020-04-30T02:42:07.789Z] 02:42:07     INFO - Stack trace:
[task 2020-04-30T02:42:07.790Z] 02:42:07     INFO - chrome://mochikit/content/browser-test.js:test_is:1297
[task 2020-04-30T02:42:07.792Z] 02:42:07     INFO - chrome://mochikit/content/tests/SimpleTest/ExtensionTestUtils.js:ExtensionTestUtils.loadExtension/<:36
[task 2020-04-30T02:42:07.793Z] 02:42:07     INFO - chrome://mochikit/content/browser-test.js:nextTest:549
[task 2020-04-30T02:42:07.794Z] 02:42:07     INFO - chrome://mochikit/content/browser-test.js:timeoutFn:1160
[task 2020-04-30T02:42:07.796Z] 02:42:07     INFO - setTimeout handler*chrome://mochikit/content/browser-test.js:Tester_execTest:1107
[task 2020-04-30T02:42:07.797Z] 02:42:07     INFO - chrome://mochikit/content/browser-test.js:nextTest/<:904
[task 2020-04-30T02:42:07.798Z] 02:42:07     INFO - chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:SimpleTest.waitForFocus/waitForFocusInner/focusedOrLoaded/<:918
[task 2020-04-30T02:42:07.800Z] 02:42:07     INFO - Not taking screenshot here: see the one that was previously logged
[task 2020-04-30T02:42:07.801Z] 02:42:07     INFO - TEST-UNEXPECTED-FAIL | devtools/client/framework/test/browser_toolbox_toolbar_reorder_with_extension.js | Extension left running at test shutdown - 
[task 2020-04-30T02:42:07.802Z] 02:42:07     INFO - Stack trace:
[task 2020-04-30T02:42:07.803Z] 02:42:07     INFO - chrome://mochikit/content/browser-test.js:test_ok:1269
[task 2020-04-30T02:42:07.804Z] 02:42:07     INFO - chrome://mochikit/content/tests/SimpleTest/ExtensionTestUtils.js:ExtensionTestUtils.loadExtension/<:117
[task 2020-04-30T02:42:07.806Z] 02:42:07     INFO - chrome://mochikit/content/browser-test.js:nextTest:549
[task 2020-04-30T02:42:07.807Z] 02:42:07     INFO - chrome://mochikit/content/browser-test.js:timeoutFn:1160
[task 2020-04-30T02:42:07.808Z] 02:42:07     INFO - setTimeout handler*chrome://mochikit/content/browser-test.js:Tester_execTest:1107
[task 2020-04-30T02:42:07.810Z] 02:42:07     INFO - chrome://mochikit/content/browser-test.js:nextTest/<:904
[task 2020-04-30T02:42:07.811Z] 02:42:07     INFO - chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:SimpleTest.waitForFocus/waitForFocusInner/focusedOrLoaded/<:918
[task 2020-04-30T02:42:07.960Z] 02:42:07     INFO - GECKO(1224) | [Parent 1224: Main Thread]: I/DocShellAndDOMWindowLeak --DOCSHELL 0x7efcb23b4400 == 7 [pid = 1224] [id = {971e8244-2351-4eef-9ca8-f49f44b936be}] [url = about:devtools-toolbox]
[task 2020-04-30T02:42:08.077Z] 02:42:08     INFO - GECKO(1224) | MEMORY STAT | vsize 3675MB | residentFast 506MB | heapAllocated 178MB
Backout by
Backed out changeset 8a0b81f6263e for causing devtools failures at devtools/client/framework/test/browser_toolbox_toolbar_reorder_with_extension.js
Pushed by
support devtools as an optional extension permission r=rpl
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla77
Flags: needinfo?(mixedpuppy)

Hi and thanks for implementing this :-). I noticed there are some public release notes now about optional permissions coming in Firefox 77 [0] - I gathered from this thread that devtools is included, but it's not mentioned there - do they need to be updated?

Do the developer docs and compat data [1] need updating too? (Apologies if that's already in-progress, or not applicable for the upcoming release.)


See Also: → 1722370

Documentation updates available for review in:

  • BCD: devtools as optional permission #20107
  • Content: devtools as optional permission #27282
You need to log in before you can comment on or make changes to this bug.