Backed out changeset 602bdd9d5a96 (bug 1461851) for linting failures on /checkouts/gecko/build/appini_header.py on a CLOSED TREE
authorGurzau Raul <rgurzau@mozilla.com>
Wed, 30 May 2018 19:03:50 +0300
changeset 420462 f8369de48c34d6b6eb3d147785aed27474a24e0d
parent 420461 602bdd9d5a96432300e7e8bd69bf608eb16ff952
child 420463 c2ac7dded317abfb28772626bd8368a217c5091f
push id64639
push userrgurzau@mozilla.com
push dateWed, 30 May 2018 16:04:22 +0000
treeherderautoland@f8369de48c34 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1461851
milestone62.0a1
backs out602bdd9d5a96432300e7e8bd69bf608eb16ff952
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
Backed out changeset 602bdd9d5a96 (bug 1461851) for linting failures on /checkouts/gecko/build/appini_header.py on a CLOSED TREE
build/appini_header.py
dom/ipc/ContentChild.cpp
dom/ipc/ContentChild.h
dom/ipc/ContentParent.cpp
dom/ipc/PContent.ipdl
toolkit/xre/nsAppRunner.cpp
tools/profiler/core/platform.cpp
xpcom/build/XREAppData.h
xpcom/glue/XREAppData.cpp
xpcom/system/nsIXULAppInfo.idl
--- a/build/appini_header.py
+++ b/build/appini_header.py
@@ -34,37 +34,30 @@ def main(output, file):
     if missing:
         print >>sys.stderr, \
             "Missing values in %s: %s" % (file, ', '.join(missing))
         sys.exit(1)
 
     if 'Crash Reporter:serverurl' not in appdata:
         appdata['Crash Reporter:serverurl'] = ''
 
-    if 'App:sourcerepository' in appdata and 'App:sourcestamp' in appdata:
-        appdata['App:sourceurl'] ='"%(App:sourcerepository)s/rev/%(App:sourcestamp)s"' % appdata
-    else:
-        appdata['App:sourceurl'] = 'NULL'
-
     output.write('''#include "mozilla/XREAppData.h"
              static const mozilla::StaticXREAppData sAppData = {
                  "%(App:vendor)s",
                  "%(App:name)s",
                  "%(App:remotingname)s",
                  "%(App:version)s",
                  "%(App:buildid)s",
                  "%(App:id)s",
                  NULL, // copyright
                  %(flags)s,
                  "%(Gecko:minversion)s",
                  "%(Gecko:maxversion)s",
                  "%(Crash Reporter:serverurl)s",
-                 %(App:profile)s,
-                 NULL, // UAName
-                 %(App:sourceurl)s
+                 %(App:profile)s
              };''' % appdata)
 
 
 if __name__ == '__main__':
     if len(sys.argv) != 1:
         main(sys.stdout, sys.argv[1])
     else:
         print >>sys.stderr, "Usage: %s /path/to/application.ini" % sys.argv[0]
--- a/dom/ipc/ContentChild.cpp
+++ b/dom/ipc/ContentChild.cpp
@@ -2700,26 +2700,24 @@ ContentChild::RecvUnlinkGhosts()
   nsWindowMemoryReporter::UnlinkGhostWindows();
 #endif
   return IPC_OK();
 }
 
 mozilla::ipc::IPCResult
 ContentChild::RecvAppInfo(const nsCString& version, const nsCString& buildID,
                           const nsCString& name, const nsCString& UAName,
-                          const nsCString& ID, const nsCString& vendor,
-                          const nsCString& sourceURL)
+                          const nsCString& ID, const nsCString& vendor)
 {
   mAppInfo.version.Assign(version);
   mAppInfo.buildID.Assign(buildID);
   mAppInfo.name.Assign(name);
   mAppInfo.UAName.Assign(UAName);
   mAppInfo.ID.Assign(ID);
   mAppInfo.vendor.Assign(vendor);
-  mAppInfo.sourceURL.Assign(sourceURL);
 
   return IPC_OK();
 }
 
 mozilla::ipc::IPCResult
 ContentChild::RecvRemoteType(const nsString& aRemoteType)
 {
   MOZ_ASSERT(DOMStringIsNull(mRemoteType));
--- a/dom/ipc/ContentChild.h
+++ b/dom/ipc/ContentChild.h
@@ -95,17 +95,16 @@ public:
   struct AppInfo
   {
     nsCString version;
     nsCString buildID;
     nsCString name;
     nsCString UAName;
     nsCString ID;
     nsCString vendor;
-    nsCString sourceURL;
   };
 
   nsresult
   ProvideWindowCommon(TabChild* aTabOpener,
                       mozIDOMWindowProxy* aOpener,
                       bool aIframeMoz,
                       uint32_t aChromeFlags,
                       bool aCalledFromJS,
@@ -414,18 +413,17 @@ public:
   virtual mozilla::ipc::IPCResult RecvShutdownA11y() override;
 
   virtual mozilla::ipc::IPCResult RecvGarbageCollect() override;
   virtual mozilla::ipc::IPCResult RecvCycleCollect() override;
   virtual mozilla::ipc::IPCResult RecvUnlinkGhosts() override;
 
   virtual mozilla::ipc::IPCResult RecvAppInfo(const nsCString& version, const nsCString& buildID,
                                               const nsCString& name, const nsCString& UAName,
-                                              const nsCString& ID, const nsCString& vendor,
-                                              const nsCString& sourceURL) override;
+                                              const nsCString& ID, const nsCString& vendor) override;
 
   virtual mozilla::ipc::IPCResult RecvRemoteType(const nsString& aRemoteType) override;
 
   const nsAString& GetRemoteType() const;
 
   virtual mozilla::ipc::IPCResult
   RecvInitServiceWorkers(const ServiceWorkerConfiguration& aConfig) override;
 
--- a/dom/ipc/ContentParent.cpp
+++ b/dom/ipc/ContentParent.cpp
@@ -2314,20 +2314,19 @@ ContentParent::InitInternal(ProcessPrior
 
   if (gAppData) {
     nsCString version(gAppData->version);
     nsCString buildID(gAppData->buildID);
     nsCString name(gAppData->name);
     nsCString UAName(gAppData->UAName);
     nsCString ID(gAppData->ID);
     nsCString vendor(gAppData->vendor);
-    nsCString sourceURL(gAppData->sourceURL);
 
     // Sending all information to content process.
-    Unused << SendAppInfo(version, buildID, name, UAName, ID, vendor, sourceURL);
+    Unused << SendAppInfo(version, buildID, name, UAName, ID, vendor);
   }
 
   // Send the child its remote type. On Mac, this needs to be sent prior
   // to the message we send to enable the Sandbox (SendStartProcessSandbox)
   // because different remote types require different sandbox privileges.
   Unused << SendRemoteType(mRemoteType);
 
   ScriptPreloader::InitContentChild(*this);
--- a/dom/ipc/PContent.ipdl
+++ b/dom/ipc/PContent.ipdl
@@ -475,17 +475,17 @@ child:
     async ActivateA11y(uint32_t aMainChromeTid, uint32_t aMsaaID);
 
     /**
      * Shutdown accessibility engine in content process (if not in use).
      */
     async ShutdownA11y();
 
     async AppInfo(nsCString version, nsCString buildID, nsCString name, nsCString UAName,
-                  nsCString ID, nsCString vendor, nsCString sourceURL);
+                  nsCString ID, nsCString vendor);
 
     /**
      * Send the remote type associated with the content process.
      */
     async RemoteType(nsString aRemoteType);
 
     /**
      * Send ServiceWorkerRegistrationData to child process.
--- a/toolkit/xre/nsAppRunner.cpp
+++ b/toolkit/xre/nsAppRunner.cpp
@@ -711,29 +711,16 @@ nsXULAppInfo::GetUAName(nsACString& aRes
     return NS_OK;
   }
   aResult.Assign(gAppData->UAName);
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsXULAppInfo::GetSourceURL(nsACString& aResult)
-{
-  if (XRE_IsContentProcess()) {
-    ContentChild* cc = ContentChild::GetSingleton();
-    aResult = cc->GetAppInfo().sourceURL;
-    return NS_OK;
-  }
-  aResult.Assign(gAppData->sourceURL);
-
-  return NS_OK;
-}
-
-NS_IMETHODIMP
 nsXULAppInfo::GetLogConsoleErrors(bool *aResult)
 {
   *aResult = gLogConsoleErrors;
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsXULAppInfo::SetLogConsoleErrors(bool aValue)
--- a/tools/profiler/core/platform.cpp
+++ b/tools/profiler/core/platform.cpp
@@ -1561,16 +1561,20 @@ StreamTaskTracer(PSLockRef aLock, Splice
 static void
 StreamMetaJSCustomObject(PSLockRef aLock, SpliceableJSONWriter& aWriter,
                          bool aIsShuttingDown)
 {
   MOZ_RELEASE_ASSERT(CorePS::Exists() && ActivePS::Exists(aLock));
 
   aWriter.IntProperty("version", 10);
 
+#if defined(MOZ_SOURCE_URL)
+  aWriter.StringProperty("sourceURL", "@MOZ_SOURCE_URL@");
+#endif
+
   // The "startTime" field holds the number of milliseconds since midnight
   // January 1, 1970 GMT. This grotty code computes (Now - (Now -
   // ProcessStartTime)) to convert CorePS::ProcessStartTime() into that form.
   TimeDuration delta = TimeStamp::Now() - CorePS::ProcessStartTime();
   aWriter.DoubleProperty(
     "startTime", static_cast<double>(PR_Now()/1000.0 - delta.ToMilliseconds()));
 
   // Write the shutdownTime field. Unlike startTime, shutdownTime is not an
@@ -1651,20 +1655,16 @@ StreamMetaJSCustomObject(PSLockRef aLock
     nsAutoCString string;
     res = appInfo->GetName(string);
     if (!NS_FAILED(res))
       aWriter.StringProperty("product", string.Data());
 
     res = appInfo->GetAppBuildID(string);
     if (!NS_FAILED(res))
       aWriter.StringProperty("appBuildID", string.Data());
-
-    res = appInfo->GetSourceURL(string);
-    if (!NS_FAILED(res))
-      aWriter.StringProperty("sourceURL", string.Data());
   }
 
   // We should avoid collecting extension metadata for profiler while XPCOM is
   // shutting down since it cannot create a new ExtensionPolicyService.
   if (!gXPCOMShuttingDown) {
     aWriter.StartObjectProperty("extensions");
     {
       {
--- a/xpcom/build/XREAppData.h
+++ b/xpcom/build/XREAppData.h
@@ -183,21 +183,16 @@ public:
    */
   CharPtr profile;
 
   /**
    * The application name to use in the User Agent string.
    */
   CharPtr UAName;
 
-  /**
-   * The URL to the source revision for this build of the application.
-   */
-  CharPtr sourceURL;
-
 #if defined(XP_WIN) && defined(MOZ_SANDBOX)
   /**
    * Chromium sandbox BrokerServices.
    */
   sandbox::BrokerServices* sandboxBrokerServices = nullptr;
   mozilla::sandboxing::PermissionsService* sandboxPermissionsService;
 #endif
 };
@@ -229,14 +224,13 @@ struct StaticXREAppData
   const char* ID;
   const char* copyright;
   uint32_t flags;
   const char* minVersion;
   const char* maxVersion;
   const char* crashReporterURL;
   const char* profile;
   const char* UAName;
-  const char* sourceURL;
 };
 
 } // namespace mozilla
 
 #endif // XREAppData_h
--- a/xpcom/glue/XREAppData.cpp
+++ b/xpcom/glue/XREAppData.cpp
@@ -20,17 +20,16 @@ XREAppData::operator=(const StaticXREApp
   ID = aOther.ID;
   copyright = aOther.copyright;
   flags = aOther.flags;
   minVersion = aOther.minVersion;
   maxVersion = aOther.maxVersion;
   crashReporterURL = aOther.crashReporterURL;
   profile = aOther.profile;
   UAName = aOther.UAName;
-  sourceURL = aOther.sourceURL;
 
   return *this;
 }
 
 XREAppData&
 XREAppData::operator=(const XREAppData& aOther)
 {
   directory = aOther.directory;
@@ -43,17 +42,16 @@ XREAppData::operator=(const XREAppData& 
   copyright = aOther.copyright;
   flags = aOther.flags;
   xreDirectory = aOther.xreDirectory;
   minVersion = aOther.minVersion;
   maxVersion = aOther.maxVersion;
   crashReporterURL = aOther.crashReporterURL;
   profile = aOther.profile;
   UAName = aOther.UAName;
-  sourceURL = aOther.sourceURL;
 #if defined(XP_WIN) && defined(MOZ_SANDBOX)
   sandboxBrokerServices = aOther.sandboxBrokerServices;
   sandboxPermissionsService = aOther.sandboxPermissionsService;
 #endif
   return *this;
 }
 
 } // namespace mozilla
--- a/xpcom/system/nsIXULAppInfo.idl
+++ b/xpcom/system/nsIXULAppInfo.idl
@@ -45,15 +45,9 @@ interface nsIXULAppInfo : nsIPlatformInf
    */
   readonly attribute ACString appBuildID;
 
   /**
    * @see XREAppData.UAName
    * @returns an empty string if XREAppData.UAName is not set.
    */
   readonly attribute ACString UAName;
-
-  /**
-   * @see XREAppData.sourceURL
-   * @returns an empty string if XREAppData.sourceURL is not set.
-   */
-  readonly attribute ACString sourceURL;
 };