Bug 1409541 - Replace IID_IUnknown with expected interfaces for outparams in a11y content ArrayData. r=Jamie, a=ritu
authorAaron Klotz <aklotz@mozilla.com>
Tue, 17 Oct 2017 15:03:40 -0600
changeset 435115 745e43737c952cb24494fb844769e76a5c729c65
parent 435114 c19fd45614748b503df767817f0ad2b7a197ee31
child 435116 f9d82e6c24c6039469356065d4bf27e331e12b72
push id1567
push userjlorenzo@mozilla.com
push dateThu, 02 Nov 2017 12:36:05 +0000
treeherdermozilla-release@e512c14a0406 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersJamie, ritu
bugs1409541
milestone57.0
Bug 1409541 - Replace IID_IUnknown with expected interfaces for outparams in a11y content ArrayData. r=Jamie, a=ritu MozReview-Commit-ID: 4t0h8zH2hsB
accessible/ipc/win/PlatformChild.cpp
--- a/accessible/ipc/win/PlatformChild.cpp
+++ b/accessible/ipc/win/PlatformChild.cpp
@@ -1,47 +1,52 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=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/. */
 
+#include "mozilla/a11y/AccessibleHandler.h"
 #include "mozilla/a11y/Compatibility.h"
 #include "mozilla/a11y/PlatformChild.h"
 #include "mozilla/mscom/EnsureMTA.h"
 #include "mozilla/mscom/InterceptorLog.h"
 
 #include "Accessible2.h"
 #include "Accessible2_2.h"
 #include "AccessibleHypertext2.h"
+#include "AccessibleTable2.h"
 #include "AccessibleTableCell.h"
 
 #include "AccessibleHypertext2_i.c"
 
 namespace mozilla {
 namespace a11y {
 
 /**
  * Unfortunately the COM interceptor does not intrinsically handle array
  * outparams. Instead we manually define the relevant metadata here, and
  * register it in a call to mozilla::mscom::RegisterArrayData.
  * @see mozilla::mscom::ArrayData
  */
 static const mozilla::mscom::ArrayData sPlatformChildArrayData[] = {
   {IID_IEnumVARIANT, 3, 1, VT_DISPATCH, IID_IDispatch, 2},
   {IID_IAccessible2, 30, 1, VT_UNKNOWN | VT_BYREF, IID_IAccessibleRelation, 2},
-  {IID_IAccessibleRelation, 7, 1, VT_UNKNOWN | VT_BYREF, IID_IUnknown, 2},
-  {IID_IAccessible2_2, 48, 2, VT_UNKNOWN | VT_BYREF, IID_IUnknown, 3,
+  {IID_IAccessibleRelation, 7, 1, VT_UNKNOWN | VT_BYREF, NEWEST_IA2_IID, 2},
+  {IID_IAccessible2_2, 48, 2, VT_UNKNOWN | VT_BYREF, NEWEST_IA2_IID, 3,
    mozilla::mscom::ArrayData::Flag::eAllocatedByServer},
-  {IID_IAccessibleTableCell, 4, 0, VT_UNKNOWN | VT_BYREF, IID_IUnknown, 1,
+  {IID_IAccessibleTableCell, 4, 0, VT_UNKNOWN | VT_BYREF, NEWEST_IA2_IID, 1,
    mozilla::mscom::ArrayData::Flag::eAllocatedByServer},
-  {IID_IAccessibleTableCell, 7, 0, VT_UNKNOWN | VT_BYREF, IID_IUnknown, 1,
+  {IID_IAccessibleTableCell, 7, 0, VT_UNKNOWN | VT_BYREF, NEWEST_IA2_IID, 1,
    mozilla::mscom::ArrayData::Flag::eAllocatedByServer},
-  {IID_IAccessibleHypertext2, 25, 0, VT_UNKNOWN | VT_BYREF, IID_IUnknown, 1,
-   mozilla::mscom::ArrayData::Flag::eAllocatedByServer}
+  {IID_IAccessibleHypertext2, 25, 0, VT_UNKNOWN | VT_BYREF,
+   IID_IAccessibleHyperlink, 1,
+   mozilla::mscom::ArrayData::Flag::eAllocatedByServer},
+  {IID_IAccessibleTable2, 12, 0, VT_UNKNOWN | VT_BYREF,
+   NEWEST_IA2_IID, 1, mozilla::mscom::ArrayData::Flag::eAllocatedByServer}
 };
 
 // Type libraries are thread-neutral, so we can register those from any
 // apartment. OTOH, proxies must be registered from within the apartment where
 // we intend to instantiate them. Therefore RegisterProxy() must be called
 // via EnsureMTA.
 PlatformChild::PlatformChild()
   : mAccTypelib(mozilla::mscom::RegisterTypelib(L"oleacc.dll",