Bug 1507002 - Use the name of the service r=nika
authorBlake Kaplan <mrbkap@gmail.com>
Wed, 14 Nov 2018 23:54:36 +0000
changeset 446468 69b45c7df6807aa0fc18e5f6d50f6437dc1ad8ed
parent 446467 12d414edb59e50411d19a5cce08c161f5e3f01fd
child 446469 05d1e5cf7faa76bc06bbdeba7c1595011b65f34e
push id73015
push usermrbkap@mozilla.com
push dateThu, 15 Nov 2018 00:05:19 +0000
treeherderautoland@69b45c7df680 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnika
bugs1507002
milestone65.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 1507002 - Use the name of the service r=nika Differential Revision: https://phabricator.services.mozilla.com/D11829
xpcom/build/Services.py
--- a/xpcom/build/Services.py
+++ b/xpcom/build/Services.py
@@ -112,17 +112,17 @@ def services_h(output):
         for namespace in reversed(segs[:-1]):
             output.write("} // namespace %s\n" % namespace)
 
         # Write out the C-style function signature, and the C++ wrapper
         output.write("""
 #ifdef MOZILLA_INTERNAL_API
 extern "C" {
 /**
- * NOTE: Don't call this method directly, instead call mozilla::services::Get{0}.
+ * NOTE: Don't call this method directly, instead call mozilla::services::Get%(name)s.
  * It is used to expose XPCOM services to rust code. The return value is already addrefed.
  */
 %(type)s* XPCOMService_Get%(name)s();
 } // extern "C"
 
 namespace mozilla {
 namespace services {
 /**
@@ -152,17 +152,17 @@ def services_cpp(output):
     output.write(CPP_INCLUDES)
 
     for (name, iface, contractid) in services:
         output.write("""
 static %(type)s* g%(name)s = nullptr;
 
 extern "C" {
 /**
- * NOTE: Don't call this method directly, instead call `mozilla::services::Get{0}`.
+ * NOTE: Don't call this method directly, instead call `mozilla::services::Get%(name)s`.
  * This method is extern "C" to expose XPCOM services to rust code.
  * The return value is already addrefed.
  */
 %(type)s*
 XPCOMService_Get%(name)s()
 {
   if (MOZ_UNLIKELY(gXPCOMShuttingDown)) {
     return nullptr;