Bug 823023 - Tweak the comment at the top of prefs.js. r=glandium
authorNicholas Nethercote <nnethercote@mozilla.com>
Fri, 02 Feb 2018 12:36:20 +1100
changeset 402185 841512e696b91825d24c6dd1a18d277c5f7d2be4
parent 402184 d4ba8209340630b87669f83fa364b484531334a9
child 402204 ed04cd8bf3fffb10153d870307d9bf425b55f423
child 402223 df844dbc028eb9fe5d2d1dcaf1ba42d2fe1ecc30
push id33370
push useraiakab@mozilla.com
push dateFri, 02 Feb 2018 10:07:56 +0000
treeherdermozilla-central@841512e696b9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs823023
milestone60.0a1
first release with
nightly linux32
841512e696b9 / 60.0a1 / 20180202102708 / files
nightly linux64
841512e696b9 / 60.0a1 / 20180202102708 / files
nightly mac
841512e696b9 / 60.0a1 / 20180202102708 / files
nightly win32
841512e696b9 / 60.0a1 / 20180202102708 / files
nightly win64
841512e696b9 / 60.0a1 / 20180202102708 / files
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 823023 - Tweak the comment at the top of prefs.js. r=glandium Specifically: - Make the warning about editing in all-caps; - Make it clear that about:config is a browser thing; - Add a mention of the user.js file; - Use C++ comments, because I prefer them to C comments and I am the module owner :) MozReview-Commit-ID: 9GXS5nNHywO
modules/libpref/Preferences.cpp
--- a/modules/libpref/Preferences.cpp
+++ b/modules/libpref/Preferences.cpp
@@ -2339,33 +2339,34 @@ Preferences::HandleDirty()
 static nsresult
 openPrefFile(nsIFile* aFile);
 
 static const char kTelemetryPref[] = "toolkit.telemetry.enabled";
 static const char kChannelPref[] = "app.update.channel";
 
 // clang-format off
 static const char kPrefFileHeader[] =
-  "# Mozilla User Preferences"
+  "// Mozilla User Preferences"
   NS_LINEBREAK
   NS_LINEBREAK
-  "/* Do not edit this file."
+  "// DO NOT EDIT THIS FILE."
+  NS_LINEBREAK
+  "//"
   NS_LINEBREAK
-  " *"
+  "// If you make changes to this file while the application is running,"
   NS_LINEBREAK
-  " * If you make changes to this file while the application is running,"
+  "// the changes will be overwritten when the application exits."
   NS_LINEBREAK
-  " * the changes will be overwritten when the application exits."
+  "//"
   NS_LINEBREAK
-  " *"
+  "// To change a preference value, you can either:"
   NS_LINEBREAK
-  " * To make a manual change to preferences, you can visit the URL "
-  "about:config"
+  "// - modify it via the UI (e.g. via about:config in the browser); or"
   NS_LINEBREAK
-  " */"
+  "// - set it within a user.js file in your profile."
   NS_LINEBREAK
   NS_LINEBREAK;
 // clang-format on
 
 // Note: if sShutdown is true, sPreferences will be nullptr.
 StaticRefPtr<Preferences> Preferences::sPreferences;
 bool Preferences::sShutdown = false;