Bug 1673648 - Use cross-platform printf format specifier r=smolnar! CLOSED TREE
authorChris H-C <chutten@mozilla.com>
Mon, 14 Dec 2020 20:38:53 +0000
changeset 560683 7f135c3044b7f431655b88d6985bec50785745a2
parent 560682 fc0424787ee7bec7a0d31144f125aecfa4343024
child 560684 092f0ef9b7cf1dc0af4a92a8712be4be761e1bbc
push id132756
push usersmolnar@mozilla.com
push dateMon, 14 Dec 2020 20:48:26 +0000
treeherderautoland@7f135c3044b7 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmolnar
bugs1673648
milestone85.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 1673648 - Use cross-platform printf format specifier r=smolnar! CLOSED TREE Differential Revision: https://phabricator.services.mozilla.com/D99714
toolkit/components/glean/bindings/private/MemoryDistribution.cpp
--- a/toolkit/components/glean/bindings/private/MemoryDistribution.cpp
+++ b/toolkit/components/glean/bindings/private/MemoryDistribution.cpp
@@ -46,17 +46,17 @@ GleanMemoryDistribution::TestGetValue(co
         !JS_DefineProperty(aCx, root, "values", valuesObj, JSPROP_ENUMERATE)) {
       return NS_ERROR_FAILURE;
     }
     auto& data = result.ref().values;
     for (auto iter = data.ConstIter(); !iter.Done(); iter.Next()) {
       const uint64_t bucket = iter.Key();
       const uint64_t count = iter.UserData();
       if (!JS_DefineProperty(aCx, valuesObj,
-                             nsPrintfCString("%lu", bucket).get(),
+                             nsPrintfCString("%" PRIu64, bucket).get(),
                              static_cast<double>(count), JSPROP_ENUMERATE)) {
         return NS_ERROR_FAILURE;
       }
     }
     aResult.setObject(*root);
   }
   return NS_OK;
 }