Bug 1333043 - Add windows build number to the environment data for all Windows versions. r=Dexter,data-r=bsmedberg
authorMarco Castelluccio <mcastelluccio@mozilla.com>
Wed, 15 Feb 2017 20:39:48 +0000
changeset 343195 9228f08cacdee37c5e741ff1abc844714a55257b
parent 343194 868a4dc22d7a40d78a620c2939be59392b7822be
child 343196 b1d2452c7c176f8004b20e01096334ff1234e055
push id31372
push usercbook@mozilla.com
push dateThu, 16 Feb 2017 12:16:10 +0000
treeherdermozilla-central@2737f66ad6ac [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersDexter
bugs1333043
milestone54.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 1333043 - Add windows build number to the environment data for all Windows versions. r=Dexter,data-r=bsmedberg
toolkit/components/telemetry/TelemetryEnvironment.jsm
toolkit/components/telemetry/docs/data/environment.rst
--- a/toolkit/components/telemetry/TelemetryEnvironment.jsm
+++ b/toolkit/components/telemetry/TelemetryEnvironment.jsm
@@ -1308,20 +1308,20 @@ EnvironmentCache.prototype = {
       data.kernelVersion = forceToStringOrNull(getSysinfoProperty("kernel_version", null));
     } else if (AppConstants.platform === "win") {
       // The path to the "UBR" key, queried to get additional version details on Windows.
       const WINDOWS_UBR_KEY_PATH = "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion";
 
       let versionInfo = getWindowsVersionInfo();
       data.servicePackMajor = versionInfo.servicePackMajor;
       data.servicePackMinor = versionInfo.servicePackMinor;
-      // We only need the build number and UBR if we're at or above Windows 10.
+      data.windowsBuildNumber = versionInfo.buildNumber;
+      // We only need the UBR if we're at or above Windows 10.
       if (typeof(data.version) === "string" &&
           Services.vc.compare(data.version, "10") >= 0) {
-        data.windowsBuildNumber = versionInfo.buildNumber;
         // Query the UBR key and only add it to the environment if it's available.
         // |readRegKey| doesn't throw, but rather returns 'undefined' on error.
         let ubr = WindowsRegistry.readRegKey(Ci.nsIWindowsRegKey.ROOT_KEY_LOCAL_MACHINE,
                                              WINDOWS_UBR_KEY_PATH, "UBR",
                                              Ci.nsIWindowsRegKey.WOW64_64);
         data.windowsUBR = (ubr !== undefined) ? ubr : null;
       }
       data.installYear = getSysinfoProperty("installYear", null);
--- a/toolkit/components/telemetry/docs/data/environment.rst
+++ b/toolkit/components/telemetry/docs/data/environment.rst
@@ -112,17 +112,17 @@ Structure:
           isTablet: <bool>, // null on failure
         },
         os: {
             name: <string>, // "Windows_NT" or null on failure
             version: <string>, // e.g. "6.1", null on failure
             kernelVersion: <string>, // android/b2g only or null on failure
             servicePackMajor: <number>, // windows only or null on failure
             servicePackMinor: <number>, // windows only or null on failure
-            windowsBuildNumber: <number>, // windows 10 only or null on failure
+            windowsBuildNumber: <number>, // windows only or null on failure
             windowsUBR: <number>, // windows 10 only or null on failure
             installYear: <number>, // windows only or null on failure
             locale: <string>, // "en" or null on failure
         },
         hdd: {
           profile: { // hdd where the profile folder is located
               model: <string>, // windows only or null on failure
               revision: <string>, // windows only or null on failure
@@ -357,17 +357,17 @@ os
 
 This object contains operating system information.
 
 - ``name``: the name of the OS.
 - ``version``: a string representing the OS version.
 - ``kernelVersion``: an Android/B2G only string representing the kernel version.
 - ``servicePackMajor``: the Windows only major version number for the installed service pack.
 - ``servicePackMinor``: the Windows only minor version number for the installed service pack.
-- ``windowsBuildNumber``: the Windows build number, only available for Windows >= 10.
+- ``windowsBuildNumber``: the Windows build number.
 - ``windowsUBR``: the Windows UBR number, only available for Windows >= 10. This value is incremented by Windows cumulative updates patches.
 - ``installYear``: the Windows only integer representing the year the OS was installed.
 - ``locale``: the string representing the OS locale.
 
 addons
 ------
 
 activeAddons