Bug 1596961 - Fix an inaccuracy in the experiments doc about running unsigned extensions r=harry
authorDrew Willcoxon <adw@mozilla.com>
Mon, 18 Nov 2019 13:55:18 +0000
changeset 502423 67de1c204ffb433aa8d8cc1c2799d17b10548b36
parent 502422 d79432359063ff9e76eb2beb606d77713444cf88
child 502424 c2ec766b798c413c44928968edd783fd454be8da
push id114172
push userdluca@mozilla.com
push dateTue, 19 Nov 2019 11:31:10 +0000
treeherdermozilla-inbound@b5c5ba07d3db [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersharry
bugs1596961
milestone72.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1596961 - Fix an inaccuracy in the experiments doc about running unsigned extensions r=harry As I'm testing the nudges extension, I'm referencing the doc and the section about running an unsigned extension normally (not temporarily) isn't quite right. It's right when it comes to loading the extension, but it's wrong in that the extension is not able to access privileged APIs. There doesn't seem to be a way to let unsigned non-temporary extensions access privileged APIs without modifying the `isPrivileged` getter. I also spent like five minutes wondering why the extension's logs weren't showing. The section talks about it but only at the very bottom, and it's easy to overlook. I think it still belongs after the main discussion, but I made it an important note so it stands out. Differential Revision: https://phabricator.services.mozilla.com/D53292
browser/components/urlbar/docs/experiments.rst
--- a/browser/components/urlbar/docs/experiments.rst
+++ b/browser/components/urlbar/docs/experiments.rst
@@ -257,25 +257,29 @@ Unsigned
   builds include Nightly and Developer Edition but not Beta or Release
   [source__]. You can load extensions temporarily by visiting
   about:debugging#/runtime/this-firefox and clicking "Load Temporary Add-on."
   `web-ext <Workflow_>`__ also loads extensions temporarily.
 
   __ https://searchfox.org/mozilla-central/rev/3a61fb322f74a0396878468e50e4f4e97e369825/toolkit/components/extensions/Extension.jsm#1816
   __ https://searchfox.org/mozilla-central/search?q=MOZ_ALLOW_LEGACY_EXTENSIONS&redirect=false
 
-  They can be also be loaded normally (not temporarily) if you use a Firefox
-  build where the build-time setting ``AppConstants.MOZ_REQUIRE_SIGNING`` is
-  false [source__, source__] and you set the ``xpinstall.signatures.required``
-  pref to false. As in the previous paragraph, such builds include Nightly and
-  Developer Edition but not Beta or Release [source__].
+  They can be also be loaded normally (not temporarily) in a custom build where
+  ``AppConstants.MOZ_ALLOW_LEGACY_EXTENSIONS`` is true (as above), or where the
+  build-time setting ``AppConstants.MOZ_REQUIRE_SIGNING`` [source__, source__]
+  and ``xpinstall.signatures.required`` pref are both false. As in the previous
+  paragraph, such builds include Nightly and Developer Edition but not Beta or
+  Release [source__]. In addition, your custom build must modify the
+  ``Extension.isPrivileged`` getter__ to return true. This getter determines
+  whether an extension can access privileged APIs.
 
   __ https://searchfox.org/mozilla-central/rev/7088fc958db5935eba24b413b1f16d6ab7bd13ea/toolkit/mozapps/extensions/internal/XPIProvider.jsm#2378
   __ https://searchfox.org/mozilla-central/rev/7088fc958db5935eba24b413b1f16d6ab7bd13ea/toolkit/mozapps/extensions/internal/AddonSettings.jsm#36
   __ https://searchfox.org/mozilla-central/search?q=MOZ_REQUIRE_SIGNING&case=false&regexp=false&path=
+  __ https://searchfox.org/mozilla-central/rev/b58e44b74ef2b4a44bdfb4140c2565ac852504be/toolkit/components/extensions/Extension.jsm#1849
 
   Extensions remain unsigned as you develop them. See the Workflow_ section for
   more.
 
 Signed for testing (Signed for QA)
   Signed-for-testing extensions that use privileged APIs can be run using the
   same techniques for running unsigned extensions.
 
@@ -294,27 +298,20 @@ Signed for testing (Signed for QA)
 
 Signed for release
   Signed-for-release extensions that use privileged APIs can be run in any
   Firefox build with no special requirements.
 
   You encounter extensions that are signed for release when you are writing
   extensions for experiments. See the Experiments_ section for details.
 
-The ``Extension.isPrivileged`` getter__ determines whether an extension can
-access privileged APIs. If you have a custom Firefox build and you want to grant
-your extension access regardless of its signed state and how it's loaded, you
-can modify the getter to return true unconditionally. This can be useful in a
-pinch.
-
-To see console logs from extensions in the browser console, check the "Show
-Content Messages" checkbox in the console. This is necessary because extensions
-run outside the main process.
-
-__ https://searchfox.org/mozilla-central/rev/34cb8d0a2a324043bcfc2c56f37b31abe7fb23a8/toolkit/components/extensions/Extension.jsm#1812
+.. important::
+  To see console logs from extensions in the browser console, select the "Show
+  Content Messages" option in the console's settings. This is necessary because
+  extensions run outside the main process.
 
 Experiments
 -----------
 
 **Experiments** let us try out ideas in Firefox outside the usual six-week
 release cycle and on particular populations of users.
 
 For example, say we have a hunch that the top sites shown on the new-tab page