bug 1250486 - make the ComponentsSH ctor constexpr r=bz
authorTrevor Saunders <tbsaunde@tbsaunde.org>
Tue, 23 Feb 2016 08:03:16 -0500
changeset 324327 228b1d50058a9f7b7e1ced4b19124c1c2d78ba1f
parent 324326 8a0a84198d1c80a0305be9f4b33c99ff7880ef34
child 324328 324c6f120c8a0d6d2ccfedbb17dc86e708346105
push id1128
push userjlund@mozilla.com
push dateWed, 01 Jun 2016 01:31:59 +0000
treeherdermozilla-release@fe0d30de989d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbz
bugs1250486
milestone47.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 1250486 - make the ComponentsSH ctor constexpr r=bz
js/xpconnect/src/XPCComponents.cpp
--- a/js/xpconnect/src/XPCComponents.cpp
+++ b/js/xpconnect/src/XPCComponents.cpp
@@ -3512,21 +3512,24 @@ NS_IMETHODIMP nsXPCComponents::ReportErr
     return utils->ReportError(error, cx);
 }
 
 /**********************************************/
 
 class ComponentsSH : public nsIXPCScriptable
 {
 public:
-    explicit ComponentsSH(unsigned dummy)
+    explicit MOZ_CONSTEXPR ComponentsSH(unsigned dummy)
     {
     }
 
-    NS_DECL_ISUPPORTS
+    // We don't actually inherit any ref counting infrastructure, but we don't
+    // need an nsAutoRefCnt member, so the _INHERITED macro is a hack to avoid
+    // having one.
+    NS_DECL_ISUPPORTS_INHERITED
     NS_DECL_NSIXPCSCRIPTABLE
     // The NS_IMETHODIMP isn't really accurate here, but NS_CALLBACK requires
     // the referent to be declared __stdcall on Windows, and this is the only
     // macro that does that.
     static NS_IMETHODIMP Get(nsIXPCScriptable** helper)
     {
         *helper = &singleton;
         return NS_OK;