Граф коммитов

198 Коммитов

Автор SHA1 Сообщение Дата
Nicholas Nethercote 0be77baa96 Bug 1370329 (part 1) - Clean up the profiler's RAII classes. r=mstange.
This patch does the following renamings, which increase consistency.

- GeckoProfilerInitRAII -> AutoProfilerInit
- GeckoProfilerThread{Sleep,Wake}RAII -> AutoProfilerThread{Sleep,Wake}
- GeckoProfilerTracingRAII -> AutoProfilerTracing
- AutoProfilerRegister -> AutoProfilerRegisterThread
- ProfilerStackFrameRAII -> AutoProfilerLabel
- nsJSUtils::mProfilerRAII -> nsJSUtils::mAutoProfilerLabel

Plus a few other minor ones (e.g. local variables).

The patch also add MOZ_GUARD_OBJECT macros to all the profiler RAII classes
that lack them, and does some minor whitespace reformatting.

--HG--
extra : rebase_source : 47e298fdd6f6b4af70e3357ec0b7b0580c0d0f50
2017-06-07 12:33:19 +10:00
Wes Kocher 3ee39c3f47 Backed out 3 changesets (bug 1354077) for assertions in AccessibleWrap.cpp a=backout CLOSED TREE
Backed out changeset 1380fe0f701b (bug 1354077)
Backed out changeset 2b5602bd352a (bug 1354077)
Backed out changeset a0fc3a1a9122 (bug 1354077)

MozReview-Commit-ID: ABHV3evXKrG
2017-06-12 16:54:10 -07:00
Aaron Klotz ed90562548 Bug 1354077: Refactor mscom::ActivationContext to separate context from activation; r=jimm
MozReview-Commit-ID: 1nrxEHEgF3T

--HG--
extra : rebase_source : f1851c890ed7747aaefc78c34bbdceaf9c70fecd
2017-06-08 18:07:24 -06:00
Aaron Klotz f2c01f6b99 Bug 1354077: Fix some problems with RegGetValue call failing due to failed type checking; r=jimm
MozReview-Commit-ID: 5iTEAW9CyJS

--HG--
extra : rebase_source : 2a1d5b4684e2fba9913e7d185738c3f5d711da8f
2017-05-25 14:08:55 -06:00
Aaron Klotz 0c65052029 Bug 1367715: Convert IsProxy check to assertion to avoid unnecessary and potentially incorrect off-main-thread QIs on release builds; r=jimm
MozReview-Commit-ID: 9WYbiW7pBjh

--HG--
extra : rebase_source : 7b04e9959f1ba2c5dcfeff384f3e3cf32b445c39
2017-05-25 12:10:30 -06:00
Aaron Klotz b1cd01ad50 Bug 1354077: Fix missing interface registration annotations for CoGetInterfaceAndReleaseStream failures; r=jimm
MozReview-Commit-ID: b7R8yGDe44

--HG--
extra : rebase_source : 1994776a889602f8ea4ac380098a38b37e1c6a2b
2017-05-19 13:59:49 -06:00
Aaron Klotz d82e0194e8 Bug 1354077: Annotate crash reports with COM interface configuration information when marshaling fails; r=jimm
MozReview-Commit-ID: GCYLbtu1Nlb

--HG--
extra : rebase_source : 565c598dcba929cb1b774b3440180c60e78da9cd
extra : amend_source : dc0051579e0b005c89fd3835f0c2b0d4fd87a280
2017-05-04 15:41:35 -06:00
Ryan VanderMeulen 6e88e0bfab 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 bc1d6a21a2 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 4978c3cc95 Bug 1322532: Platform a11y changes to enable handler-based live regions; r=tbsaunde
MozReview-Commit-ID: nNPvBy3ZGO

--HG--
extra : rebase_source : 8c9f9e7a07e1e2268d922574273a3d65919513a7
2017-04-13 20:35:32 -06:00
Aaron Klotz b836337e81 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.

--HG--
extra : rebase_source : acb44dead7cc5488424720e1bf58862b7b30374f
2017-04-04 15:23:55 -06:00
Aaron Klotz bf041cb767 Bug 1303060: Simplifications to mscom handler code; r=jimm
MozReview-Commit-ID: 5YEVtL8gw6S

--HG--
rename : ipc/mscom/IHandlerPayload.h => ipc/mscom/IHandlerProvider.h
extra : rebase_source : 167f69b591f55228859f3941903f776208f22067
2017-03-27 18:41:06 -06:00
Andrew McCreight d18859f043 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

--HG--
extra : rebase_source : b711f37b169f3c93a39fc2af56a9c76c656a9c38
2017-03-26 06:56:01 -07:00
Aaron Klotz 45cba5a03b 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 518de5dc75 Bug 1346910: Ensure that the interface output by IServiceProvider::QueryService is correctly wrapped by the mscom interceptor; r=jimm
MozReview-Commit-ID: 40fF7cS0Mpx

--HG--
extra : rebase_source : 79573a2b845c65164dac35a5ad2b99fe7af13ac7
2017-03-14 11:04:46 -06:00
Aaron Klotz 116698fb6b Bug 1344965: Clean up mscom interfaces to improve separation of concerns; r=jimm
MozReview-Commit-ID: C96y3i8hjWs

--HG--
extra : histedit_source : 8cee3ff07ecd0310ac9648d903328d54588d3dde
2017-03-06 17:22:43 -07:00
Aaron Klotz 90071c5f69 Bug 1344798: Allow mscom::AsyncInvoker to be able to handle proxied and non-proxied interfaces; r=jimm
MozReview-Commit-ID: 6lQg6fwuvmw

--HG--
extra : histedit_source : 28d66eb2ec245b8ca41baba85c7a74ecbc3341f2
2017-03-02 17:39:01 -07:00
Ryan VanderMeulen 8dbf7d75e2 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 f394903529 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 10b6488d0c Bug 1325834: Add crash reporter annotations to report COM marshaling failure codes; r=jimm
MozReview-Commit-ID: FcEBoU0DzzR

--HG--
extra : rebase_source : a6cb3f2735ff0470bcff96b3832bad794701783f
2017-02-27 11:55:42 -07:00
Aaron Klotz 833aa2af27 Bug 1303060: Additions to ipc/mscom for out-of-process components; r=jimm
MozReview-Commit-ID: IYjONGbBraG

--HG--
extra : rebase_source : a6eb90db7a9c21b91b9e763a15a9a661d41c5e77
2017-02-17 16:20:51 -07:00
Aaron Klotz f3fa5ee8d2 Bug 1303060: ipc/mscom changes for handler and payload support; r=jimm
MozReview-Commit-ID: 13NFW1pgxix

--HG--
extra : rebase_source : 18cc11d4c1dc62bc0ee428608f6cb57e32c4d0af
2017-02-17 17:30:03 -07:00
Aaron Klotz 1110b03572 Bug 1339945: Refactor mscom::MainThreadInvoker's wait mechanism into a separate class; r=handyman
MozReview-Commit-ID: BikO5ng6joM

--HG--
extra : rebase_source : f5b92fece72e627f7edf8e3e3a120e25f41a7686
2017-02-10 11:27:01 -07:00
Aaron Klotz 7d2dd562c2 Bug 1342992: Make mscom::Weakref final; r=jimm
MozReview-Commit-ID: 7SZpXP2adK7

--HG--
extra : rebase_source : 49e9108c9ade5d4392f9a4ec52fb8413512ccc88
2017-02-27 11:44:45 -07:00
Michael Layzell 893ed78ef5 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 ac9295ead2 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 7e8f316730 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 dac86659ac 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 68316b419c 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 f3b557f70c Bug 1303060: Additions to ipc/mscom for out-of-process components; r=jimm
MozReview-Commit-ID: IYjONGbBraG

--HG--
extra : rebase_source : a6eb90db7a9c21b91b9e763a15a9a661d41c5e77
2017-02-17 16:20:51 -07:00
Aaron Klotz af5bd498da Bug 1303060: ipc/mscom changes for handler and payload support; r=jimm
MozReview-Commit-ID: 13NFW1pgxix

--HG--
extra : rebase_source : 18cc11d4c1dc62bc0ee428608f6cb57e32c4d0af
2017-02-17 17:30:03 -07:00
Aaron Klotz 3d7955bc43 Bug 1338609: Add the ability to serialize and deserialize structs using Microsoft RPC to mscom; r=jimm
MozReview-Commit-ID: CSkNYCIQYQe

--HG--
extra : rebase_source : 8e357eb60adf2040d30f826b1805c35163456aa0
2017-02-17 14:26:56 -07:00
Aaron Klotz 74cac7296d Bug 1338596: Add support for agile references to mscom; r=jimm
MozReview-Commit-ID: 1NZoFZntO3g

--HG--
extra : rebase_source : 6d3ed1da4893747d38c1bd2c31671d8ecf535cfd
2017-02-10 11:18:26 -07:00
Ryan VanderMeulen 4c43de6e62 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 d8a1f446d1 Bug 1339951: Refactor mscom weak reference support and establish lock hierarchy within; r=jimm
MozReview-Commit-ID: BJJpSj44alY

--HG--
extra : rebase_source : ed64776fc38dd59af48edd6b24959c012755b67a
2017-02-17 17:35:01 -07:00
Sebastian Hengst 892a8de889 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 440976dd4f Bug 1339947: Make mscom ArrayData lookup respect interface inheritance; r=jimm
MozReview-Commit-ID: 5zJTzT7JJhJ

--HG--
extra : rebase_source : 1cc459ae3b50a0424c336467e3e99db387eadd86
2017-02-10 14:16:29 -07:00
Aaron Klotz a6c766977b Bug 1339951: Refactor mscom weak reference support and establish lock hierarchy within; r=jimm
MozReview-Commit-ID: BJJpSj44alY

--HG--
extra : rebase_source : 2a18f861da83633a6cd443b80155946483e7cf49
2017-02-15 15:33:32 -07:00
Aaron Klotz d236f79291 Bug 1339942: Make mscom registration able to be compiled and run outside Mozilla processes; r=jimm
MozReview-Commit-ID: 3ETSE5Qn8nd

--HG--
extra : rebase_source : cfab62cd77e0bed75a8600d1f0441b9683966307
2017-02-15 14:37:20 -07:00
Aaron Klotz b9df44ad52 Bug 1338600: Add support for COM asynchronous interfaces to mscom; r=jimm
MozReview-Commit-ID: EcbeH9KSZrQ

--HG--
extra : rebase_source : 11919a376bfa7f58d5a18d005ab78c9f84b63688
2017-02-15 14:09:02 -07:00
Nicholas Nethercote 334f89c567 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 08f3a463ec Bug 1334665: Eliminate runtime dynamic linking for pre-win7 functions in ipc/mscom; r=jimm
MozReview-Commit-ID: 7ySl728hdka

--HG--
extra : rebase_source : fd5914c70fb89176a71ffbc636c0f39662cf9d38
2017-01-27 14:53:20 -07:00
Aaron Klotz 3ef6514406 Bug 1335235: Add disabling of the COM BSTR cache to mscom::MainThreadRuntime; r=jimm
MozReview-Commit-ID: 5RQvHiBoD2B

--HG--
extra : rebase_source : 52425f3e5838939d17c29729caf70534212c328a
2017-01-30 16:39:08 -07:00
Joel Maher 566fa285c7 Bug 1333460 - add BUG_COMPONENT to ipc/* files. r=billm
MozReview-Commit-ID: G9jzVGDlAaz
2017-01-25 06:17:10 -05:00
Aaron Klotz a2e223b2f8 Bug 1331687: Overload mscom::RegisterProxy to allow proxy registration from within xul.dll itself; r=jimm
MozReview-Commit-ID: EiIS5sOCntb

--HG--
extra : rebase_source : e0c5f6001bc4c85bdf1db10baa748e393df5a031
2017-01-17 13:19:40 -07:00
Chris Peterson 971f368adf Bug 1330496 - Part 3: Remove other ipc checks for Windows Vista or 7+. r=aklotz
MozReview-Commit-ID: 9z5LKw71Veg

--HG--
extra : rebase_source : 34e4edb7f5dd92cdca0ca638398705ded48bd3bc
extra : histedit_source : 06350bb2aa8baf386431e634d63819d87cd18fe1
2017-01-09 21:03:57 -08:00
Wes Kocher f2afbdd978 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 ab058eb02b Bug 1325834: Add MOZ_DIAGNOSTIC_ASSERTs to mscom proxy deserialization code; r=jimm
MozReview-Commit-ID: 9i4A1SFkyZP

--HG--
extra : amend_source : 408641f3624861d6ce624e4766994dbc3d37e10c
2017-01-10 13:55:32 -07:00
Ting-Yu Chou 0643b83e9b Bug 1322465 part 6 - Use explicit/MOZ_IMPLICIT for the unary constructors in ipc/. r=aklotz,Ehsan
MozReview-Commit-ID: 6vg1HZaWtS

--HG--
extra : rebase_source : 3d9a0b6ee94d86c6e9346b59a3567071667c5820
2016-12-16 15:56:04 +08:00
Ting-Yu Chou 76cef3b73d Bug 1322460 - Don't addref/release on the return value of prohibited functions. r=aklotz,Ehsan
MozReview-Commit-ID: B0mAMZp5sll

--HG--
extra : rebase_source : fb5e25352089e26172189b9c4f2be8c5553fa5a8
2016-12-14 14:34:26 +08:00
Ting-Yu Chou 4f285bd583 Bug 1322458 - Fix kungFuDeathGrip errors that clang plugin reports on Windows. r=aklotz,Ehsan
MozReview-Commit-ID: FLTLZSg2yh9

--HG--
extra : rebase_source : e8aad8f35cffb3312e043a4fcec6296371baf432
2016-12-14 16:34:12 +08:00
Nathan Froyd 2ebbd09068 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 389462bb42 Bug 1294903: Add a default constructor to mscom::EnsureMTA that ensures that the MTA thread is running; r=jimm
MozReview-Commit-ID: IN4maTgdL4l

--HG--
extra : rebase_source : 95e31fb15b02f1dc04b20f4684464386848d1d93
2016-11-15 11:33:57 -07:00
Aaron Klotz 31db1f008a Bug 1315638: Modify MainThreadHandoff::FixArrayElements to be able to distinguish between outparams with different levels of indirection; r=jimm
MozReview-Commit-ID: HZgED9JT16m

--HG--
extra : rebase_source : 3b147251d55229aa5722d9f9ec6a9ad832a83c87
2016-11-07 16:04:06 -07:00
Wes Kocher db15df3e50 Merge m-c to inbound, a=merge CLOSED TREE 2016-11-04 15:19:49 -07:00
Jacek Caban 28399d9154 Bug 1263224: cross-compilation fixup. 2016-11-04 15:40:41 +01:00
Aaron Klotz a7baaddbf0 Bug 1311748: Remove extra pointer dereference from MainThreadHandoff::FixArrayElements; r=jimm
MozReview-Commit-ID: 2hLgQ1km07J

--HG--
extra : rebase_source : 371222c8106fd662a4a455117621f22bbc1b3bef
2016-11-03 11:25:26 -06:00
Carsten "Tomcat" Book 9031c83f32 Merge mozilla-central to autoland 2016-10-26 17:14:27 +02:00
Aaron Klotz 8cfa990adf Bug 1311834: Make MainThreadInvoker use a spin loop on multiprocessor machines; r=jimm
MozReview-Commit-ID: 5xKdm7Z4oKs

--HG--
extra : rebase_source : f71e3b762501d8e24446ba8913c841cfe03a277b
2016-10-25 15:43:40 -06:00
Aaron Klotz 938166ed49 Bug 1310841: Make mscom registration use CoGetClassObject so that COM will retain a reference to the proxy dll; r=jimm
MozReview-Commit-ID: GZxbLCC6gVi

--HG--
extra : amend_source : 3cee23be271cfd35860869bd9446a3c95aaa4945
extra : histedit_source : 25a8893fff465ffc50dc95c2a8a5f011f0fd381f
2016-10-25 15:04:47 -06:00
Aaron Klotz 9772dd793a Bug 1306014: Modify ipc/mscom/moz.build to only build essentials when a11y is disabled in build config; r=jimm
MozReview-Commit-ID: 4B08546SS4w

--HG--
extra : rebase_source : bded5176afaf99cb681c1be4b70edb9457ed2028
2016-09-28 14:09:07 -06:00
Aaron Klotz 96c052cf1f Bug 1304883: Modify mscom::MainThreadInvoker and Win32 widget to use atomic boolean to flag pending APCs; r=jimm
MozReview-Commit-ID: 7fXoDkBEd2V

--HG--
extra : rebase_source : 1960f9bf8294bfea15209554dd7fdc0ce1df5dcc
2016-09-22 15:07:01 -06:00
Carsten "Tomcat" Book 0f2c669a48 merge mozilla-inbound to mozilla-central a=merge 2016-09-09 12:02:43 +02:00
Aaron Klotz fec23fc114 Bug 1301217: Ensure that RegisteredProxy objects are MTA-aware; r=jimm
MozReview-Commit-ID: HStX3pBl5ly
2016-09-07 16:10:45 -06:00
Aaron Klotz 23956d09e2 Bug 1301184: Notify the profiler and hang monitor when we're executing APCs; r=jimm
MozReview-Commit-ID: B4nTiAf9GNk
2016-09-06 14:39:37 -06:00
Kacper Michajlow 47fc1444d9 Bug 1297794 - Fix SetEntriesInAcl failure on non-English Windows version. r=aklotz
MozReview-Commit-ID: 4FJBtUBjPEu

--HG--
extra : rebase_source : 4463d4d897587e9a6427252b4c373b38c2c6331d
2016-08-24 20:57:16 +02:00
Nicholas Nethercote 34dcc7b852 Bug 1299384 - Use MOZ_MUST_USE with NS_warn_if_impl(). r=erahm.
This change avoids lots of false positives for Coverity's CHECKED_RETURN
warning, caused by NS_WARN_IF's current use in both statement-style and
expression-style.

In the case where the code within the NS_WARN_IF has side-effects, I made the
following change.

> NS_WARN_IF(NS_FAILED(FunctionWithSideEffects()));
> -->
> Unused << NS_WARN_IF(NS_FAILED(FunctionWithSideEffects()));

In the case where the code within the NS_WARN_IF lacks side-effects, I made the
following change.

> NS_WARN_IF(!condWithoutSideEffects);
> -->
> NS_WARNING_ASSERTION(condWithoutSideEffects, "msg");

This has two improvements.
- The condition is not evaluated in non-debug builds.
- The sense of the condition is inverted to the familiar "this condition should
  be true" sense used in assertions.

A common variation on the side-effect-free case is the following.

> nsresult rv = Fn();
> NS_WARN_IF_(NS_FAILED(rv));
> -->
> DebugOnly<nsresult rv> = Fn();
> NS_WARNING_ASSERTION(NS_SUCCEEDED(rv), "Fn failed");

--HG--
extra : rebase_source : 58788245021096efa8372a9dc1d597a611d45611
2016-09-02 17:12:24 +10:00
Nathan Froyd 40d6f37643 Bug 1298462 - tidy ipc/mscom/ files to avoid warnings from clang-cl; r=aklotz
Changing classes to `final` avoids complaints about deleting a class with
virtual functions.  Making destructors private avoids static_asserts from
XPCOM code about refcounted classes with public destructors.

MozReview-Commit-ID: IiPrZln1wvj

--HG--
extra : rebase_source : 5d70eea909e9d8c7f191c465b700b778b7ff564c
2016-08-26 14:26:29 -04:00
Aaron Klotz 63a3869bb8 Bug 1298412: Fix Interceptor construction to use Move semantics for STAUniquePtr instead of pass-by-reference; r=jimm
MozReview-Commit-ID: 8DzeT35Ao4O

--HG--
extra : rebase_source : 14a94903843e54c1c4a4b6c980805ed37d878911
2016-08-26 10:03:17 -06:00
Nathan Froyd ed976e566d Bug 1298882 - ensure mozilla/mscom/Utils.h is included with uniform casing; r=aklotz
We install mozilla/mscom/Utils.h, but include it with an all-lowercased
path in some places.  clang-cl warns about this, and even though this is
Windows-only code and will therefore work, it's better to make
everything consistent.
2016-08-29 21:55:37 -04:00
Nathan Froyd 6d0ffbfa26 Bug 1298840 - declare dependent type with typename in ParamTraits<COMPtrHolder<Interface, _IID>>; r=aklotz
MSVC lets this slide, but clang-cl complains about the missing typename.
2016-08-29 21:47:03 -04:00
Aaron Klotz bed7a5af8c Bug 1292452: MainThreadHandoff enhancements to support array outparams in IA2; r=jimm
MozReview-Commit-ID: LTxj7fHEoAb

--HG--
extra : histedit_source : cbf34c9dac0acee94f0a8fe6488567530ededd0d
2016-08-08 18:06:51 -06:00
Sebastian Hengst 1ab23ac869 Backed out changeset dd26b9ddef2c (bug 1292452) 2016-08-19 10:02:02 +02:00
Wes Kocher a58f8b89a0 Merge m-c to inbound, a=merge 2016-08-18 16:32:58 -07:00
Aaron Klotz 2745382e59 Bug 1293486: Add tearoff IDispatch handler to mscom interceptor; r=jimm
MozReview-Commit-ID: 9PSbpkNcOOh

--HG--
extra : rebase_source : 13ba9a670a43dc68b7760410fd808e03e1ac6d9c
2016-08-12 12:12:48 -06:00
Aaron Klotz cf36a3119b Bug 1292452: MainThreadHandoff enhancements to support array outparams in IA2; r=jimm
MozReview-Commit-ID: LTxj7fHEoAb
2016-08-08 18:06:51 -06:00
Aaron Klotz 54e228e02f Bug 1296333: Ensure better handling of nullptr and IUnknown in ipc::mscom; r=jimm
MozReview-Commit-ID: H1PvH3PIWdK

--HG--
extra : amend_source : 7d41fb7bfcd2576d316900361d23f966b478e277
2016-08-18 09:48:48 -06:00
Aaron Klotz fc25b0f50c Bug 1287875: Don't try to obtain NS_APP_CONTENT_PROCESS_TEMP_DIR unless MOZ_CONTENT_SANDBOX is defined; r=haik
MozReview-Commit-ID: Li1I4CtmXvE

--HG--
extra : rebase_source : 72357591259f261b5310e9679f752d9c949951f8
2016-07-29 12:20:01 -06:00
Aaron Klotz 1e94ab2a1b Bug 1263224: Add ability to wrap a COM method invocation and hand it off to the main thread for execution; r=jimm
MozReview-Commit-ID: EfoH3imaev5

--HG--
extra : rebase_source : d158c737c5ae789ea64bec99ab09b14a92e8c4f3
2016-07-19 13:31:25 -06:00
Aaron Klotz 76d0ed29d4 Bug 1263224: Adds COM interception that allows us to proxy COM invocations; r=jimm
MozReview-Commit-ID: 7dp0Jokg0X3

--HG--
extra : rebase_source : 6c8e2a85b896dbb143dfc5ecd8088b24524689d7
2016-07-27 11:44:56 -06:00
Aaron Klotz 05c8c56d9d Bug 1263224: Add support for thread-safe weak references for COM-based objects; r=jimm
MozReview-Commit-ID: JxVMyDhNPs4

--HG--
extra : rebase_source : 66366989c31c6b4fb1e640e54ba3b81d3729526b
2016-07-19 13:36:55 -06:00
Aaron Klotz 89a48d5463 Bug 1263224: Adds MainThreadInvoker class for posting Asynchronous Procedure Calls to the main thread; r=jimm
MozReview-Commit-ID: 6Be0p0z9CXI

--HG--
extra : rebase_source : ca9f37da2e3da31efbdb1b770d70c7f28f07c37f
2016-07-19 13:35:36 -06:00
Aaron Klotz 62f0203838 Bug 1263224: Smart pointers for passing COM interface pointers around in other apartments; r=jimm
MozReview-Commit-ID: 377VvQ5PMCJ

--HG--
extra : rebase_source : c64ed8690ee42141ebe6aa97ef0b750c7e058647
2016-07-19 13:13:31 -06:00
Aaron Klotz fcdf74c9f5 Bug 1287875: Adds a logging facility for intercepted COM traffic; r=jimm
MozReview-Commit-ID: BfjSAVOo18G

--HG--
extra : rebase_source : 70dd4a9fc6464f4168b0e97554efc8c8c416fb58
2016-07-14 17:11:33 -06:00
Aaron Klotz a0b2e7cafa Bug 1286986: Add glue to enable process-local registration of COM proxies at runtime; r=jimm
MozReview-Commit-ID: 7VTCPQa90Vv

--HG--
extra : rebase_source : 58808455042378883a4df8f97010702d03824e00
2016-07-27 11:45:08 -06:00
Aaron Klotz b99626af7a Bug 1261107: Adds code to marshal a Microsoft COM object and transfer its serialized proxy across IPDL; r=billm,jimm
MozReview-Commit-ID: BpSpue4Fq6G

--HG--
extra : rebase_source : 32a33339b3c6dcd69fadd6d2987bafd2ded9c689
2016-07-27 11:44:29 -06:00
Aaron Klotz 39c0509759 Bug 1261107: Add EnsureMTA class to ipc/mscom/Utils. This class synchronously executes a function on a background thread that resides in Microsoft COM's multithreaded apartment; r=jimm
MozReview-Commit-ID: KTE1VdCYS0O

--HG--
extra : rebase_source : e5dc30a20447830c1c33e4bc7479b56627ad52f9
2016-07-18 13:49:28 -06:00
Aaron Klotz 7f91347e43 Bug 1261107: Add IsCurrentThreadMTA() to ipc/mscom/Utils; r=jimm
MozReview-Commit-ID: 3ezKIAmvZZM

--HG--
extra : rebase_source : 50fc20f3e7fa19c94cdc37afc15e262ac479ac28
2016-07-18 13:47:34 -06:00
Tom Tromey 5538d692d3 Bug 1286877 - do not set c-basic-offset for python-mode; r=gps
This removes the unnecessary setting of c-basic-offset from all
python-mode files.

This was automatically generated using

    perl -pi -e 's/; *c-basic-offset: *[0-9]+//'

... on the affected files.

The bulk of these files are moz.build files but there a few others as
well.

MozReview-Commit-ID: 2pPf3DEiZqx

--HG--
extra : rebase_source : 0a7dcac80b924174a2c429b093791148ea6ac204
2016-07-14 10:16:42 -06:00
Aaron Klotz 52f2033824 Bug 1277075: Add MainThreadRuntime class to mscom glue, enabling safe initialization of COM security and exception handlers; r=jimm
MozReview-Commit-ID: 9Ig9wb4KVps

--HG--
extra : rebase_source : 6a8da83dbdae9b7407598997ffbe56eeca3a4d26
2016-07-20 11:10:46 -06:00
Iris Hsiao 7e0c7b0fbf Backed out changeset 88e5ef869df6 (bug 1277075) for assertion failures 2016-07-20 14:13:10 +08:00
Aaron Klotz 102b144717 Bug 1277075: Add MainThreadRuntime class to mscom glue, enabling safe initialization of COM security and exception handlers; r=jimm
MozReview-Commit-ID: 9Ig9wb4KVps

--HG--
extra : rebase_source : 23b5a577b19e40729476299049a0dc464ba6e4de
2016-07-14 16:54:53 -06:00
Iris Hsiao a024afd017 Backed out changeset 26fe03ac12be (bug 1277075) for Windows build bustage 2016-07-19 12:36:27 +08:00
Aaron Klotz 20b5649ee9 Bug 1277075: Add MainThreadRuntime class to mscom glue, enabling safe initialization of COM security and exception handlers; r=jimm
MozReview-Commit-ID: BKDnWQLCYGI

--HG--
extra : rebase_source : 091ed78a5b30c674ad8a7964b0ae5ffe66e905e5
2016-07-14 16:54:53 -06:00
Aaron Klotz f92a107e86 Bug 1287002: Add DynamicallyLinkedFunctionPtr helper class to mscom glue; r=jimm
MozReview-Commit-ID: JnsXxi3oQ9r

--HG--
extra : rebase_source : fd0806fcd47b3d060236db00277415a4cf07e9c7
2016-06-03 12:56:24 -06:00
Aaron Klotz 67768a9eb7 Bug 1287002: Utility functions for Microsoft COM glue; r=jimm
MozReview-Commit-ID: DTH2lIvKjX9

--HG--
extra : rebase_source : e7e4e32f2175322c4ab20a205e37f6b2d34822f8
2016-07-14 16:55:31 -06:00
Aaron Klotz 140fb74701 Bug 1287002: Add RAII class for entering a COM apartment; r=jimm
MozReview-Commit-ID: DEwU3vU1P5P

--HG--
extra : rebase_source : 05f2ce1b51e32e369965c189ead9071b05b6e498
2016-06-03 12:30:31 -06:00
Aaron Klotz c8479a9f4c Bug 1287002: Skeleton moz.build for ipc/mscom directory; r=billm
MozReview-Commit-ID: 4SDUWyTCppL

--HG--
extra : rebase_source : fd96ce17f38936e4e51bcc837c615cc80932f3f5
2016-06-03 12:29:21 -06:00