Bug 1341082 - Add ACCESSIBILITY guards to functions in Utils.cpp that depend on it being enabled. r=aklotz
authorRyan VanderMeulen <ryanvm@gmail.com>
Tue, 21 Feb 2017 15:27:18 -0500
changeset 344168 54175c795fbee1d3ca7c7a210f670cf3f0c6acfc
parent 344167 50e44effc231ca9a609f14b37f8ec82a26515a63
child 344169 bc401cae3a9074ad98566042c7e4188881dcefaf
push id31402
push usercbook@mozilla.com
push dateWed, 22 Feb 2017 13:33:50 +0000
treeherdermozilla-central@f5372cb6c3c7 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersaklotz
bugs1341082
milestone54.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 1341082 - Add ACCESSIBILITY guards to functions in Utils.cpp that depend on it being enabled. r=aklotz
ipc/mscom/Utils.cpp
ipc/mscom/Utils.h
--- a/ipc/mscom/Utils.cpp
+++ b/ipc/mscom/Utils.cpp
@@ -1,18 +1,21 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* 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/. */
 
+#ifdef ACCESSIBILITY
 #include "mozilla/mscom/Registration.h"
+#include "nsTArray.h"
+#endif
+
 #include "mozilla/mscom/Utils.h"
 #include "mozilla/RefPtr.h"
-#include "nsTArray.h"
 
 #include <objbase.h>
 #include <objidl.h>
 
 namespace mozilla {
 namespace mscom {
 
 bool
@@ -41,16 +44,17 @@ IsProxy(IUnknown* aUnknown)
   HRESULT hr = aUnknown->QueryInterface(IID_IClientSecurity,
                                         (void**)getter_AddRefs(clientSecurity));
   if (SUCCEEDED(hr) || hr == RPC_E_WRONG_THREAD) {
     return true;
   }
   return false;
 }
 
+#ifdef ACCESSIBILITY
 static bool
 IsVtableIndexFromParentInterface(TYPEATTR* aTypeAttr,
                                  unsigned long aVtableIndex)
 {
   MOZ_ASSERT(aTypeAttr);
 
   // This is the number of functions declared in this interface (excluding
   // parent interfaces).
@@ -168,11 +172,12 @@ IsInterfaceEqualToOrInheritedFrom(REFIID
       }
 
       typeInfos.AppendElement(Move(nextTypeInfo));
     }
   }
 
   return false;
 }
+#endif // ifdef ACCESSIBILITY
 
 } // namespace mscom
 } // namespace mozilla
--- a/ipc/mscom/Utils.h
+++ b/ipc/mscom/Utils.h
@@ -2,27 +2,32 @@
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* 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/. */
 
 #ifndef mozilla_mscom_Utils_h
 #define mozilla_mscom_Utils_h
 
+#ifdef ACCESSIBILITY
 #include <guiddef.h>
+#endif
 
 struct IUnknown;
 
 namespace mozilla {
 namespace mscom {
 
 bool IsCurrentThreadMTA();
 bool IsProxy(IUnknown* aUnknown);
+
+#ifdef ACCESSIBILITY
 bool IsVtableIndexFromParentInterface(REFIID aInterface,
                                       unsigned long aVtableIndex);
 bool IsInterfaceEqualToOrInheritedFrom(REFIID aInterface, REFIID aFrom,
                                        unsigned long aVtableIndexHint);
+#endif
 
 } // namespace mscom
 } // namespace mozilla
 
 #endif // mozilla_mscom_Utils_h