Bug 1329697 - registering typelib for IGeckoCustom interface. r=aklotz
authorYura Zenevich <yzenevich@mozilla.com>
Mon, 09 Jan 2017 12:26:35 -0500
changeset 331029 3df827c3c6da15c55771bf43ec5aea1898aaa09f
parent 331028 4404f99d719acdad42f1939b7d4a55091b1854d7
child 331030 902da67acc3c6fe79decd8762de2bdba7a21a5bb
push id86147
push useryura.zenevich@gmail.com
push dateWed, 25 Jan 2017 18:41:08 +0000
treeherdermozilla-inbound@3df827c3c6da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersaklotz
bugs1329697
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 1329697 - registering typelib for IGeckoCustom interface. r=aklotz MozReview-Commit-ID: CIvoSrPrRVM
accessible/ipc/win/PlatformChild.cpp
accessible/ipc/win/PlatformChild.h
accessible/windows/msaa/Platform.cpp
--- a/accessible/ipc/win/PlatformChild.cpp
+++ b/accessible/ipc/win/PlatformChild.cpp
@@ -45,16 +45,23 @@ static const mozilla::mscom::ArrayData s
 PlatformChild::PlatformChild()
   : mAccTypelib(mozilla::mscom::RegisterTypelib(L"oleacc.dll",
         mozilla::mscom::RegistrationFlags::eUseSystemDirectory))
   , mMiscTypelib(mozilla::mscom::RegisterTypelib(L"Accessible.tlb"))
 {
   mozilla::mscom::InterceptorLog::Init();
   mozilla::mscom::RegisterArrayData(sPlatformChildArrayData);
 
+
+  UniquePtr<mozilla::mscom::RegisteredProxy> customProxy;
+  mozilla::mscom::EnsureMTA([&customProxy]() -> void {
+    customProxy = Move(mozilla::mscom::RegisterProxy());
+  });
+  mCustomProxy = Move(customProxy);
+
   UniquePtr<mozilla::mscom::RegisteredProxy> ia2Proxy;
   mozilla::mscom::EnsureMTA([&ia2Proxy]() -> void {
     ia2Proxy = Move(mozilla::mscom::RegisterProxy(L"ia2marshal.dll"));
   });
   mIA2Proxy = Move(ia2Proxy);
 }
 
 } // namespace a11y
--- a/accessible/ipc/win/PlatformChild.h
+++ b/accessible/ipc/win/PlatformChild.h
@@ -18,16 +18,17 @@ public:
   PlatformChild();
 
   PlatformChild(PlatformChild&) = delete;
   PlatformChild(PlatformChild&&) = delete;
   PlatformChild& operator=(PlatformChild&) = delete;
   PlatformChild& operator=(PlatformChild&&) = delete;
 
 private:
+  UniquePtr<mozilla::mscom::RegisteredProxy> mCustomProxy;
   UniquePtr<mozilla::mscom::RegisteredProxy> mIA2Proxy;
   UniquePtr<mozilla::mscom::RegisteredProxy> mAccTypelib;
   UniquePtr<mozilla::mscom::RegisteredProxy> mMiscTypelib;
 };
 
 } // namespace mozilla
 } // namespace a11y
 
--- a/accessible/windows/msaa/Platform.cpp
+++ b/accessible/windows/msaa/Platform.cpp
@@ -17,29 +17,33 @@
 #include "mozilla/mscom/Registration.h"
 #include "mozilla/StaticPtr.h"
 #include "ProxyWrappers.h"
 
 using namespace mozilla;
 using namespace mozilla::a11y;
 using namespace mozilla::mscom;
 
+static StaticAutoPtr<RegisteredProxy> gRegCustomProxy;
 static StaticAutoPtr<RegisteredProxy> gRegProxy;
 static StaticAutoPtr<RegisteredProxy> gRegAccTlb;
 static StaticAutoPtr<RegisteredProxy> gRegMiscTlb;
 
 void
 a11y::PlatformInit()
 {
   Compatibility::Init();
 
   nsWinUtils::MaybeStartWindowEmulation();
   ia2AccessibleText::InitTextChangeData();
   if (BrowserTabsRemoteAutostart()) {
     mscom::InterceptorLog::Init();
+    UniquePtr<RegisteredProxy> regCustomProxy(
+        mscom::RegisterProxy());
+    gRegCustomProxy = regCustomProxy.release();
     UniquePtr<RegisteredProxy> regProxy(
         mscom::RegisterProxy(L"ia2marshal.dll"));
     gRegProxy = regProxy.release();
     UniquePtr<RegisteredProxy> regAccTlb(
         mscom::RegisterTypelib(L"oleacc.dll",
                                RegistrationFlags::eUseSystemDirectory));
     gRegAccTlb = regAccTlb.release();
     UniquePtr<RegisteredProxy> regMiscTlb(
@@ -49,16 +53,17 @@ a11y::PlatformInit()
 }
 
 void
 a11y::PlatformShutdown()
 {
   ::DestroyCaret();
 
   nsWinUtils::ShutdownWindowEmulation();
+  gRegCustomProxy = nullptr;
   gRegProxy = nullptr;
   gRegAccTlb = nullptr;
   gRegMiscTlb = nullptr;
 }
 
 void
 a11y::ProxyCreated(ProxyAccessible* aProxy, uint32_t aInterfaces)
 {