Bug 1153978 - Part 0: Separate nsIPlatformInfo from nsIXULAppInfo. r=jst
☠☠ backed out by f6e85049facf ☠ ☠
authorTooru Fujisawa <arai_a@mac.com>
Thu, 04 Feb 2016 06:12:45 +0900
changeset 288417 905e3a9f755778aacfbf3308ff00e9f2ee22ffb5
parent 288416 c1bb74893286a8a73eb76700ea65bd5470b77da8
child 288418 08ee8e76c7039e07c91f34477121787c845c2cca
push id73418
push userarai_a@mac.com
push dateSat, 12 Mar 2016 17:22:03 +0000
treeherdermozilla-inbound@8db1ac84d30e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjst
bugs1153978
milestone48.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 1153978 - Part 0: Separate nsIPlatformInfo from nsIXULAppInfo. r=jst
toolkit/xre/nsAppRunner.cpp
xpcom/system/moz.build
xpcom/system/nsIPlatformInfo.idl
xpcom/system/nsIXULAppInfo.idl
--- a/toolkit/xre/nsAppRunner.cpp
+++ b/toolkit/xre/nsAppRunner.cpp
@@ -63,16 +63,17 @@
 #include "nsIConsoleService.h"
 #include "nsIContentHandler.h"
 #include "nsIDialogParamBlock.h"
 #include "nsIDOMWindow.h"
 #include "mozilla/ModuleUtils.h"
 #include "nsIIOService2.h"
 #include "nsIObserverService.h"
 #include "nsINativeAppSupport.h"
+#include "nsIPlatformInfo.h"
 #include "nsIProcess.h"
 #include "nsIProfileUnlocker.h"
 #include "nsIPromptService.h"
 #include "nsIServiceManager.h"
 #include "nsIStringBundle.h"
 #include "nsISupportsPrimitives.h"
 #include "nsIToolkitChromeRegistry.h"
 #include "nsIToolkitProfile.h"
@@ -736,16 +737,17 @@ class nsXULAppInfo : public nsIXULAppInf
                      public nsIFinishDumpingCallback,
 #endif
                      public nsIXULRuntime
 
 {
 public:
   MOZ_CONSTEXPR nsXULAppInfo() {}
   NS_DECL_ISUPPORTS_INHERITED
+  NS_DECL_NSIPLATFORMINFO
   NS_DECL_NSIXULAPPINFO
   NS_DECL_NSIXULRUNTIME
   NS_DECL_NSIOBSERVER
 #ifdef MOZ_CRASHREPORTER
   NS_DECL_NSICRASHREPORTER
   NS_DECL_NSIFINISHDUMPINGCALLBACK
 #endif
 #ifdef XP_WIN
@@ -759,17 +761,18 @@ NS_INTERFACE_MAP_BEGIN(nsXULAppInfo)
   NS_INTERFACE_MAP_ENTRY(nsIObserver)
 #ifdef XP_WIN
   NS_INTERFACE_MAP_ENTRY(nsIWinAppHelper)
 #endif
 #ifdef MOZ_CRASHREPORTER
   NS_INTERFACE_MAP_ENTRY(nsICrashReporter)
   NS_INTERFACE_MAP_ENTRY(nsIFinishDumpingCallback)
 #endif
-  NS_INTERFACE_MAP_ENTRY_CONDITIONAL(nsIXULAppInfo, gAppData || 
+  NS_INTERFACE_MAP_ENTRY(nsIPlatformInfo)
+  NS_INTERFACE_MAP_ENTRY_CONDITIONAL(nsIXULAppInfo, gAppData ||
                                      XRE_IsContentProcess())
 NS_INTERFACE_MAP_END
 
 NS_IMETHODIMP_(MozExternalRefCountType)
 nsXULAppInfo::AddRef()
 {
   return 1;
 }
--- a/xpcom/system/moz.build
+++ b/xpcom/system/moz.build
@@ -9,16 +9,17 @@ XPIDL_SOURCES += [
     'nsIDeviceSensors.idl',
     'nsIExternalApplication.idl',
     'nsIGConfService.idl',
     'nsIGeolocationProvider.idl',
     'nsIGIOService.idl',
     'nsIGSettingsService.idl',
     'nsIHapticFeedback.idl',
     'nsIPackageKitService.idl',
+    'nsIPlatformInfo.idl',
     'nsIXULAppInfo.idl',
     'nsIXULRuntime.idl',
 ]
 
 if CONFIG['MOZ_CRASHREPORTER']:
     XPIDL_SOURCES += [
         'nsICrashReporter.idl',
     ]
new file mode 100644
--- /dev/null
+++ b/xpcom/system/nsIPlatformInfo.idl
@@ -0,0 +1,19 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#include "nsISupports.idl"
+
+[scriptable, uuid(ab6650cf-0806-4aea-b8f2-40fdae74f1cc)]
+interface nsIPlatformInfo : nsISupports
+{
+  /**
+   * The version of the XULRunner platform.
+   */
+  readonly attribute ACString platformVersion;
+
+  /**
+   * The build ID/date of gecko and the XULRunner platform.
+   */
+  readonly attribute ACString platformBuildID;
+};
--- a/xpcom/system/nsIXULAppInfo.idl
+++ b/xpcom/system/nsIXULAppInfo.idl
@@ -1,21 +1,21 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-#include "nsISupports.idl"
+#include "nsIPlatformInfo.idl"
 
 /**
  * A scriptable interface to the nsXULAppAPI structure. See nsXULAppAPI.h for
  * a detailed description of each attribute.
  */
 
-[scriptable, uuid(1518e7d2-022a-4dae-b02e-bbe7ffcf2145)]
-interface nsIXULAppInfo : nsISupports
+[scriptable, uuid(ddea4f31-3c5e-4769-ac68-21ab4b3d7845)]
+interface nsIXULAppInfo : nsIPlatformInfo
 {
   /**
    * @see nsXREAppData.vendor
    * @returns an empty string if nsXREAppData.vendor is not set.
    */
   readonly attribute ACString vendor;
 
   /**
@@ -41,23 +41,13 @@ interface nsIXULAppInfo : nsISupports
   /**
    * The build ID/date of the application. For xulrunner applications,
    * this will be different than the build ID of the platform. Be careful
    * about which one you want.
    */
   readonly attribute ACString appBuildID;
 
   /**
-   * The version of the XULRunner platform.
-   */
-  readonly attribute ACString platformVersion;
-
-  /**
-   * The build ID/date of gecko and the XULRunner platform.
-   */
-  readonly attribute ACString platformBuildID;
-  
-  /**
    * @see nsXREAppData.UAName
    * @returns an empty string if nsXREAppData.UAName is not set.
    */
   readonly attribute ACString UAName;
 };