Commit Graph
92 Commits
Author SHA1 Message Date
Aaron Klotz cf53e986bf Bug 1354077: Annotate crash reports with COM interface configuration information when marshaling fails; r=jimm
MozReview-Commit-ID: GCYLbtu1Nlb
2017-05-04 15:41:35 -06:00
Ryan VanderMeulen 2b44dbbac8 Bug 1363127 - Include nsPrintfCString.h in ProxyStream.cpp to fix --disable-accessibility bustage. r=aklotz 2017-05-11 17:22:19 -04:00
Nicholas Nethercote c768a954ae Bug 1358320 - Make TimeStamp::ProcessCreation()'s outparam optional. r=gsvelto.
TimeStamp::ProcessCreations()'s aIsInconsistent outparam is ignored by the
majority of its caller. This patch makes it optional. Notably, this makes
ProcessCreation() easier to use in a constructor's initializer list.
2017-04-26 14:55:54 +10:00
Aaron Klotz a0a37a918c Bug 1322532: Platform a11y changes to enable handler-based live regions; r=tbsaunde
MozReview-Commit-ID: nNPvBy3ZGO
2017-04-13 20:35:32 -06:00
Aaron Klotz f9d4c14477 Bug 1303060: Changes to a11y to enable the serving of a COM handler; r=tbsaunde
MozReview-Commit-ID: GTQF3x1pBtX

A general outline of the COM handler (a.k.a. the "smart proxy"):

COM handlers are pieces of code that are loaded by the COM runtime along with
a proxy and are layered above that proxy. This enables the COM handler to
interpose itself between the caller and the proxy, thus providing the
opportunity for the handler to manipulate an interface's method calls before
those calls reach the proxy.

Handlers are regular COM components that live in DLLs and are declared in the
Windows registry. In order to allow for the specifying of a handler (and an
optional payload to be sent with the proxy), the mscom library allows its
clients to specify an implementation of the IHandlerProvider interface.

IHandlerProvider consists of 5 functions:

* GetHandler returns the CLSID of the component that should be loaded into
  the COM client's process. If GetHandler returns a failure code, then no
  handler is loaded.
* GetHandlerPayloadSize and WriteHandlerPayload are for obtaining the payload
  data. These calls are made on a background thread but need to do their work
  on the main thread. We declare the payload struct in IDL. MIDL generates two
  functions, IA2Payload_Encode and IA2Payload_Decode, which are used by
  mscom::StructToStream to read and write that struct to and from buffers.
* The a11y payload struct also includes an interface, IGeckoBackChannel, that
  allows the handler to communicate directly with Gecko. IGeckoBackChannel
  currently provides two methods: one to allow the handler to request fresh
  cache information, and the other to provide Gecko with its IHandlerControl
  interface.
* MarshalAs accepts an IID that specifies the interface that is about to be
  proxied. We may want to send a more sophisticated proxy than the one that
  is requested. The desired IID is returned by this function. In the case of
  a11y interfaces, we should always return IAccessible2_3 if we are asked for
  one of its parent interfaces. This allows us to eliminate round trips to
  resolve more sophisticated interfaces later on.
* NewInstance, which is needed to ensure that all descendent proxies are also
  imbued with the same handler code.

The main focus of this patch is as follows:

1. Provide an implementation of the IHandlerProvider interface;
2. Populate the handler payload (ie, the cache) with data;
3. Modify CreateHolderFromAccessible to specify the HandlerPayload object;
4. Receive the IHandlerControl interface from the handler DLL and move it
   into the chrome process.

Some more information about IHandlerControl:

There is one IHandlerControl per handler DLL instance. It is the interface that
we call in Gecko when we need to dispatch an event to the handler. In order to
ensure that events are dispatched in the correct order, we need to dispatch
those events from the chrome main thread so that they occur in sequential order
with calls to NotifyWinEvent.
2017-04-04 15:23:55 -06:00
Aaron Klotz 5f967c1deb Bug 1303060: Simplifications to mscom handler code; r=jimm
MozReview-Commit-ID: 5YEVtL8gw6S
2017-03-27 18:41:06 -06:00
Andrew McCreight 78bf10d4b1 Bug 1350688 - Use a thread safe way to get the CPU count in the SpinEvent ctor. r=aklotz
Initializing nsSystemInfo can't be done off the main thread on
Windows, and we can't guarantee that it has been initialized before
calling this code.

MozReview-Commit-ID: DRNCrakNMmH
2017-03-26 06:56:01 -07:00
Aaron Klotz 59332b7333 Bug 1325834: Make mscom::ProxyStream use CreateStreamOnHGlobal instead of SHCreateMemStream on Windows 7; r=jimm
MozReview-Commit-ID: FAlPgS6iJL
2017-03-14 18:42:24 -06:00
Aaron Klotz f4b7507bcb Bug 1346910: Ensure that the interface output by IServiceProvider::QueryService is correctly wrapped by the mscom interceptor; r=jimm
MozReview-Commit-ID: 40fF7cS0Mpx
2017-03-14 11:04:46 -06:00
Aaron Klotz 7abd45dd4f Bug 1344965: Clean up mscom interfaces to improve separation of concerns; r=jimm
MozReview-Commit-ID: C96y3i8hjWs
2017-03-06 17:22:43 -07:00
Aaron Klotz 865bcd6961 Bug 1344798: Allow mscom::AsyncInvoker to be able to handle proxied and non-proxied interfaces; r=jimm
MozReview-Commit-ID: 6lQg6fwuvmw
2017-03-02 17:39:01 -07:00
Ryan VanderMeulen 56c189f80f Bug 1344187 - Add guards around code in ProxyStream.cpp that require the crash reporter. r=aklotz 2017-03-03 13:33:13 -05:00
Aaron Klotz aaadf6d57c Bug 1303060: Fix problematic annotation on mscom::InParamWalker; r=staticbustage-fix
MozReview-Commit-ID: 2QtUJ4Bbk1m
2017-03-01 11:05:35 -07:00
Aaron Klotz bbe619ed07 Bug 1325834: Add crash reporter annotations to report COM marshaling failure codes; r=jimm
MozReview-Commit-ID: FcEBoU0DzzR
2017-02-27 11:55:42 -07:00
Aaron Klotz 19093b8b80 Bug 1303060: Additions to ipc/mscom for out-of-process components; r=jimm
MozReview-Commit-ID: IYjONGbBraG
2017-02-17 16:20:51 -07:00
Aaron Klotz 09a0d81c31 Bug 1303060: ipc/mscom changes for handler and payload support; r=jimm
MozReview-Commit-ID: 13NFW1pgxix
2017-02-17 17:30:03 -07:00
Aaron Klotz e94bcd41f4 Bug 1339945: Refactor mscom::MainThreadInvoker's wait mechanism into a separate class; r=handyman
MozReview-Commit-ID: BikO5ng6joM
2017-02-10 11:27:01 -07:00
Aaron Klotz 88541a35c6 Bug 1342992: Make mscom::Weakref final; r=jimm
MozReview-Commit-ID: 7SZpXP2adK7
2017-02-27 11:44:45 -07:00
Michael Layzell 7ad42f641e Bug 1336510 - Part 10: Remove unnecessary assertion from SharedRef::Clear(), r=aklotz
MozReview-Commit-ID: Fx7CmxgiJpo
2017-02-24 14:34:32 -05:00
Michael Layzell 3021a2f0ac Bug 1336510 - Part 7: Stop capturing this by value in windows-only code, r=aklotz
MozReview-Commit-ID: B4dYo4ETzkL
2017-02-24 14:34:27 -05:00
Wes Kocher 4f2e3a1877 Backed out 8 changesets (bug 1336510) for windows debug mn-e10s failures a=backout
Backed out changeset 419ada2f9e81 (bug 1336510)
Backed out changeset 19239f566a93 (bug 1336510)
Backed out changeset c8aeead6fe83 (bug 1336510)
Backed out changeset 422e63b872b5 (bug 1336510)
Backed out changeset 21869174dfd3 (bug 1336510)
Backed out changeset 57476b9f342d (bug 1336510)
Backed out changeset e842cdaaa7e5 (bug 1336510)
Backed out changeset bd943b368ff7 (bug 1336510)

MozReview-Commit-ID: 2z3Wa9QFkX4
2017-02-23 16:07:41 -08:00
Michael Layzell 62e029b414 Bug 1336510 - Part 7: Stop capturing this by value in windows-only code, r=aklotz
MozReview-Commit-ID: B4dYo4ETzkL
2017-02-23 12:24:12 -05:00
Phil Ringnalda 1f8ff08ac3 Backed out 2 changesets (bug 1303060) for Windows static-analysis bustage
CLOSED TREE

Backed out changeset 729a1b8c7e47 (bug 1303060)
Backed out changeset 604605ca738c (bug 1303060)
2017-02-22 21:55:15 -08:00
Aaron Klotz 9cb67425a6 Bug 1303060: Additions to ipc/mscom for out-of-process components; r=jimm
MozReview-Commit-ID: IYjONGbBraG
2017-02-17 16:20:51 -07:00
Aaron Klotz 2a74be65f3 Bug 1303060: ipc/mscom changes for handler and payload support; r=jimm
MozReview-Commit-ID: 13NFW1pgxix
2017-02-17 17:30:03 -07:00
Aaron Klotz 603457996e Bug 1338609: Add the ability to serialize and deserialize structs using Microsoft RPC to mscom; r=jimm
MozReview-Commit-ID: CSkNYCIQYQe
2017-02-17 14:26:56 -07:00
Aaron Klotz 83fd5c9861 Bug 1338596: Add support for agile references to mscom; r=jimm
MozReview-Commit-ID: 1NZoFZntO3g
2017-02-10 11:18:26 -07:00
Ryan VanderMeulen a6b9303953 Bug 1341082 - Add ACCESSIBILITY guards to functions in Utils.cpp that depend on it being enabled. r=aklotz 2017-02-21 15:27:18 -05:00
Aaron Klotz 49eba1cb0c Bug 1339951: Refactor mscom weak reference support and establish lock hierarchy within; r=jimm
MozReview-Commit-ID: BJJpSj44alY
2017-02-17 17:35:01 -07:00
Sebastian Hengst fe6d00c743 Backed out changeset 06cd86f16c70 (bug 1339951) in hope for fix for a11y related crashes e.g. in Mn-e10s on Windows 8 x64 debug test_accessibility.py TestAccessibility.test_click_raises_element_not_accessible. r=backout 2017-02-18 01:18:45 +01:00
Aaron Klotz 0d6e0ecbbb Bug 1339947: Make mscom ArrayData lookup respect interface inheritance; r=jimm
MozReview-Commit-ID: 5zJTzT7JJhJ
2017-02-10 14:16:29 -07:00
Aaron Klotz df210c8b43 Bug 1339951: Refactor mscom weak reference support and establish lock hierarchy within; r=jimm
MozReview-Commit-ID: BJJpSj44alY
2017-02-15 15:33:32 -07:00
Aaron Klotz ebf87da989 Bug 1339942: Make mscom registration able to be compiled and run outside Mozilla processes; r=jimm
MozReview-Commit-ID: 3ETSE5Qn8nd
2017-02-15 14:37:20 -07:00
Aaron Klotz 150bc963c5 Bug 1338600: Add support for COM asynchronous interfaces to mscom; r=jimm
MozReview-Commit-ID: EcbeH9KSZrQ
2017-02-15 14:09:02 -07:00
Nicholas Nethercote 401f105d67 Bug 1339327 (part 5) - Rename some profiler functions related to sleeping. r=mstange.
The new names make it clearer that these actions apply to just one thread.

- profiler_sleep_start() --> profiler_thread_sleep()
- profiler_sleep_end()   --> profiler_thread_wake()
- profiler_is_sleeping() --> profiler_thread_is_sleeping()
- GeckoProfilerSleepRAII --> GeckoProfilerThreadSleepRAII
- GeckoProfilerWakeRAII  --> GeckoProfilerThreadWakeRAII
2017-02-15 14:26:23 +11:00
Aaron Klotz 9f4d06dead Bug 1334665: Eliminate runtime dynamic linking for pre-win7 functions in ipc/mscom; r=jimm
MozReview-Commit-ID: 7ySl728hdka
2017-01-27 14:53:20 -07:00
Aaron Klotz ab72011c0f Bug 1335235: Add disabling of the COM BSTR cache to mscom::MainThreadRuntime; r=jimm
MozReview-Commit-ID: 5RQvHiBoD2B
2017-01-30 16:39:08 -07:00
Joel Maher 84a0231459 Bug 1333460 - add BUG_COMPONENT to ipc/* files. r=billm
MozReview-Commit-ID: G9jzVGDlAaz
2017-01-25 06:17:10 -05:00
Aaron Klotz 38440f51cd Bug 1331687: Overload mscom::RegisterProxy to allow proxy registration from within xul.dll itself; r=jimm
MozReview-Commit-ID: EiIS5sOCntb
2017-01-17 13:19:40 -07:00
Chris Peterson 334b850d7e Bug 1330496 - Part 3: Remove other ipc checks for Windows Vista or 7+. r=aklotz
MozReview-Commit-ID: 9z5LKw71Veg
2017-01-09 21:03:57 -08:00
Wes Kocher aa76cd1ec0 Backed out changeset 8da0d71a754c (bug 1325834) for mn-e10s bustage a=backout
MozReview-Commit-ID: 85BcTBhW6HY
2017-01-10 17:33:39 -08:00
Aaron Klotz e378f8ceb9 Bug 1325834: Add MOZ_DIAGNOSTIC_ASSERTs to mscom proxy deserialization code; r=jimm
MozReview-Commit-ID: 9i4A1SFkyZP
2017-01-10 13:55:32 -07:00
Ting-Yu Chou ddfcf68346 Bug 1322465 part 6 - Use explicit/MOZ_IMPLICIT for the unary constructors in ipc/. r=aklotz,Ehsan
MozReview-Commit-ID: 6vg1HZaWtS
2016-12-16 15:56:04 +08:00
Ting-Yu Chou 5fab2a878b Bug 1322460 - Don't addref/release on the return value of prohibited functions. r=aklotz,Ehsan
MozReview-Commit-ID: B0mAMZp5sll
2016-12-14 14:34:26 +08:00
Ting-Yu Chou 0b4be44a91 Bug 1322458 - Fix kungFuDeathGrip errors that clang plugin reports on Windows. r=aklotz,Ehsan
MozReview-Commit-ID: FLTLZSg2yh9
2016-12-14 16:34:12 +08:00
Nathan Froyd b995466f21 Bug 1320752 - remove mozilla/Function.h; r=gerald
We have std::function available now, which is likely to be somewhat more
efficient.
2016-11-28 11:03:53 -05:00
Aaron Klotz fcbea4f003 Bug 1294903: Add a default constructor to mscom::EnsureMTA that ensures that the MTA thread is running; r=jimm
MozReview-Commit-ID: IN4maTgdL4l
2016-11-15 11:33:57 -07:00
Aaron Klotz 1569e24093 Bug 1315638: Modify MainThreadHandoff::FixArrayElements to be able to distinguish between outparams with different levels of indirection; r=jimm
MozReview-Commit-ID: HZgED9JT16m
2016-11-07 16:04:06 -07:00
Wes Kocher c92af64732 Merge m-c to inbound, a=merge CLOSED TREE 2016-11-04 15:19:49 -07:00
Jacek Caban 5e9f828a60 Bug 1263224: cross-compilation fixup. 2016-11-04 15:40:41 +01:00