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

43 Коммитов

Автор SHA1 Сообщение Дата
Aaron Klotz dba13b1668 Bug 1674452: Add interface information to ORPC profiler markers; r=Jamie
* We add a new function to `mscom/Utils.h`: `DiagnosticNameForIID`. Its
  purpose is to generate a friendly name for an interface, given an IID.
  For special interfaces internal to COM, we add our own descriptive strings.
  If the interface does not have a description, we simply convert the IID
  to string format using GUIDToString.
* We modify `ProfilerMarkerChannelHook` to include the additional diagnostic
  information for IIDs in its markers.
* Since each marker is now differentiated by IID, we remove the restriction
  that we only use markers for the outermost COM call. In particular, this
  assumption doesn't hold for asynchronous COM calls, so we would be losing
  data in the case where an async call was pending while the main thread was
  still making COM calls on other interfaces.
  * There isn't really an effective way to distinguish between sync and
    async calls at the channel hook layer. I'm thinking about how we could
    perhaps modify `AsyncInvoker` to help mark these, but it's a bit messy.
    I'm going to postpone that to future work.
* Other potential future work is expanding the number of interfaces for which
  we have frendly names. I could see us annotating our various COM interfaces
  in a way that we could automagically generate human-readable descriptions for
  those interfaces.

Differential Revision: https://phabricator.services.mozilla.com/D97042
2020-11-16 19:50:42 +00:00
Aaron Klotz 87fbdfd39e Bug 1674904: Part 2 - New dll registration code in mscom/oop/module; r=Jamie
We add new DLL registration code. This is a rather generic function that
permits the following:

* Registering multiple `CLSID`s for the same DLL;
* Registering an optional `AppID`. Registering an `AppID` allows us to use a
  `DllSurrogate` to host the DLL out-of-process using Windows' built-in
  `dllhost.exe`. I'll be using this feature in a future bug.
* Supporting all available threading modelsl;
* Capable of registering either inproc servers or inproc handlers;
* Using the transaction-based registry API so that we can cleanly rollback
  during registration if any part(s) of it fail.

Differential Revision: https://phabricator.services.mozilla.com/D95606
2020-11-04 21:49:46 +00:00
Dorel Luca e3198dde0a Backed out 4 changesets (bug 1674904) for Build bustage in worker/checkouts/gecko/config/rules.mk. CLOSED TREE
Backed out changeset 50576e0fbd98 (bug 1674904)
Backed out changeset b3b7d68c33f6 (bug 1674904)
Backed out changeset 660cdea23685 (bug 1674904)
Backed out changeset 7322c3af8006 (bug 1674904)
2020-11-04 23:20:51 +02:00
Aaron Klotz a4a05e12e3 Bug 1674904: Part 2 - New dll registration code in mscom/oop/module; r=Jamie
We add new DLL registration code. This is a rather generic function that
permits the following:

* Registering multiple `CLSID`s for the same DLL;
* Registering an optional `AppID`. Registering an `AppID` allows us to use a
  `DllSurrogate` to host the DLL out-of-process using Windows' built-in
  `dllhost.exe`. I'll be using this feature in a future bug.
* Supporting all available threading modelsl;
* Capable of registering either inproc servers or inproc handlers;
* Using the transaction-based registry API so that we can cleanly rollback
  during registration if any part(s) of it fail.

Differential Revision: https://phabricator.services.mozilla.com/D95606
2020-11-04 20:46:30 +00:00
Aaron Klotz 4baff096be Bug 1674902: Part 3 - Add IsCurrentThreadNonMainMTA to mscom/Utils.h; r=Jamie
This is a new check that I'd like to use in some future patches.

Differential Revision: https://phabricator.services.mozilla.com/D95599
2020-11-03 16:55:21 +00:00
Aaron Klotz d6a168786b Bug 1674902: Part 1 - s/uint32_t/long/ for return codes in mscom/Utils.h; r=Jamie
`HRESULT` is `typedef`'d as `long`, so this patch harmonizes the return codes.

Differential Revision: https://phabricator.services.mozilla.com/D95597
2020-11-03 16:54:48 +00:00
Cristina Coroiu ae74e57f04 Backed out 6 changesets (bug 1674902) for build bustage on a CLOSED TREE
Backed out changeset e4f63ba14348 (bug 1674902)
Backed out changeset 9f6e1866a7c3 (bug 1674902)
Backed out changeset a71e810d79d0 (bug 1674902)
Backed out changeset 071d1d593deb (bug 1674902)
Backed out changeset e88b258d7013 (bug 1674902)
Backed out changeset d1f72c3f70a0 (bug 1674902)
2020-11-03 17:47:35 +02:00
Aaron Klotz 3b4cad3543 Bug 1674902: Part 3 - Add IsCurrentThreadNonMainMTA to mscom/Utils.h; r=Jamie
This is a new check that I'd like to use in some future patches.

Depends on D95598

Differential Revision: https://phabricator.services.mozilla.com/D95599
2020-11-03 02:35:51 +00:00
Aaron Klotz 8e3b8ba2bb Bug 1674902: Part 1 - s/uint32_t/long/ for return codes in mscom/Utils.h; r=Jamie
`HRESULT` is `typedef`'d as `long`, so this patch harmonizes the return codes.

Differential Revision: https://phabricator.services.mozilla.com/D95597
2020-11-03 02:09:17 +00:00
Simon Giesecke cd8b8939b9 Bug 1648010 - Replace uses of NS_LITERAL_STRING/NS_LITERAL_CSTRING macros by _ns literals. r=geckoview-reviewers,jgilbert,agi,hsivonen,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D80860
2020-07-01 08:29:29 +00:00
Aaron Klotz 016b50d12d Bug 1621030: Make string comparisons in IsClassThreadAwareInprocServer case-insensitive; r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D66078

--HG--
extra : moz-landing-system : lando
2020-03-09 21:46:19 +00:00
Aaron Klotz b36ad40063 Bug 1570701: Part 1 - Add IsClassThreadAwareInprocServer utility function to MSCOM; r=Jamie
We want to ensure that the code being added in part 2 is only used when it is
reasonable and safe to do so. One way to ensure this is to add a check that the
desired CLSID is an in-process, thread-aware server.

Differential Revision: https://phabricator.services.mozilla.com/D44518

--HG--
extra : moz-landing-system : lando
2019-09-03 23:58:39 +00:00
Aaron Klotz 9b3cf34d2e Bug 1573679: Add IsCurrentThread(Explicit|Implicit)MTA utility functions to mscom; r=Jamie
This patch provides us with utility functions that give us more specific
information about the current thread's MTA if so desired.

Differential Revision: https://phabricator.services.mozilla.com/D41852

--HG--
extra : moz-landing-system : lando
2019-08-27 01:48:08 +00:00
Ehsan Akhgari e5e885ae31 Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre
# ignore-this-changeset

--HG--
extra : amend_source : 7221c8d15a765df71171099468e7c7faa648f37c
extra : histedit_source : a0cce6015636202bff09e35a13f72e03257a7695
2019-01-18 10:16:18 +01:00
Sylvestre Ledru 265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Aaron Klotz ab58dd7f8b Bug 1489317: Part 4 - Add asssertion that COM is initialized on the thread that is resolving an agile reference; r=mhowell
Depends on D5321

Differential Revision: https://phabricator.services.mozilla.com/D5323

--HG--
extra : moz-landing-system : lando
2018-09-12 18:56:10 +00:00
Cosmin Sabou ee876fb168 Backed out 4 changesets (bug 1489317) for causing multiple windows tests timeouts. CLOSED TREE
Backed out changeset e35a9b02675b (bug 1489317)
Backed out changeset 7528056ab631 (bug 1489317)
Backed out changeset d5d432fd2433 (bug 1489317)
Backed out changeset fddf77dc2f9d (bug 1489317)
2018-09-11 09:22:37 +03:00
Aaron Klotz a29e528ede Bug 1489317: Part 4 - Add asssertion that COM is initialized on the thread that is resolving an agile reference; r=mhowell
Depends on D5321

Differential Revision: https://phabricator.services.mozilla.com/D5323

--HG--
extra : source : 07b44bee061cf080e70e6872f5f15e22e23819e0
2018-09-10 22:59:07 +00:00
Ciure Andrei 7a6f7c263a Backed out 4 changesets (bug 1489317) for windows test failures CLOSED TREE
Backed out changeset 07b44bee061c (bug 1489317)
Backed out changeset b340f5acb7b5 (bug 1489317)
Backed out changeset 62b404e59c32 (bug 1489317)
Backed out changeset 2787fb454f40 (bug 1489317)
2018-09-11 04:22:44 +03:00
Aaron Klotz e30084f558 Bug 1489317: Part 4 - Add asssertion that COM is initialized on the thread that is resolving an agile reference; r=mhowell
Depends on D5321

Differential Revision: https://phabricator.services.mozilla.com/D5323

--HG--
extra : moz-landing-system : lando
2018-09-10 22:59:07 +00:00
Ciure Andrei 66949099e9 Backed out 4 changesets (bug 1489317) for causing Windows test failures CLOSED TREE
Backed out changeset 8cf95604ce94 (bug 1489317)
Backed out changeset 9d444f92b939 (bug 1489317)
Backed out changeset e0535e0450c8 (bug 1489317)
Backed out changeset 0f8554d82b32 (bug 1489317)
2018-09-11 00:50:10 +03:00
Aaron Klotz c603f63fc2 Bug 1489317: Part 4 - Add asssertion that COM is initialized on the thread that is resolving an agile reference; r=mhowell
Depends on D5321

Differential Revision: https://phabricator.services.mozilla.com/D5323

--HG--
extra : moz-landing-system : lando
2018-09-10 20:03:24 +00:00
Emilio Cobos Álvarez fffb25b74f Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj
This was done automatically replacing:

  s/mozilla::Move/std::move/
  s/ Move(/ std::move(/
  s/(Move(/(std::move(/

Removing the 'using mozilla::Move;' lines.

And then with a few manual fixups, see the bug for the split series..

MozReview-Commit-ID: Jxze3adipUh
2018-06-01 10:45:27 +02:00
Miko Mynttinen 65c6bee9d6 Bug 1445302 - Replace TArray.RemoveElementAt(TArray.Length() - 1) pattern with TArray.RemoveLastElement() or TArray.PopLastElement() r=froydnj
MozReview-Commit-ID: rGjabnP2iz

--HG--
extra : rebase_source : 1ef6c5ce028ac9ebd9f3176d57835c43fe46bada
2018-03-13 14:51:33 +01:00
Aaron Klotz f550f56c7e Bug 1394395 - Fix mscom build when ACCESSIBILITY is disabled. r=jimm
MozReview-Commit-ID: KmMTWR9FQcx

--HG--
extra : rebase_source : afb5ebce0c9478b4fba26610c2ee4292ee4afcb2
2017-08-28 12:27:28 -06:00
Aaron Klotz 5921c2115b Bug 1393589: Refactor NOPING marshaling into its own class, mscom::FastMarshaler, and use it with IGeckoBackChannel; r=jimm
MozReview-Commit-ID: 9osDoYcvtWV

--HG--
extra : rebase_source : 9ead42f1b0c79f11b15121274a996d33d7ad4830
2017-08-17 15:54:28 -06:00
Aaron Klotz d7d645f5c4 Bug 1390652: Part 3 - Add proxy wrapper that passes its inner proxy through content as a blob; r=jimm
MozReview-Commit-ID: A4pAyiuJUlz
2017-08-21 15:47:44 -06:00
Aaron Klotz bd05dcbb61 Bug 1392681: Move IStream creation out of mscom::ProxyStream into its own utility functions; r=jimm
MozReview-Commit-ID: EucWtw0YeBI
2017-08-22 10:48:12 -06:00
Tom Ritter 22bb00663c Bug 1380147 Correct Windows flag name r=jld
MozReview-Commit-ID: mO7gO99fDV

--HG--
extra : rebase_source : 770d37802db80d8f4e98c389bf2d51bdd125dcae
2017-07-12 13:42:57 -05:00
Tom Ritter 7860d5ee3e Bug 1380092 Return 0 instead of nullptr r=jld
nullptr is explicitly not allowed to be cast to an int.
But uintptr_t is an unsigned int that happens to be large
enough to hold a pointer.

Return 0, which is an int.

MozReview-Commit-ID: 2SE76JuJLCo

--HG--
extra : rebase_source : b5e34b608af806fb05e9eaa4550b171e6db0eb8d
2017-07-11 15:13:38 -05:00
Aaron Klotz 761daf6aed Bug 1354077: Refactor mscom::ActivationContext to separate context from activation; r=jimm
MozReview-Commit-ID: 1nrxEHEgF3T
2017-06-13 14:50:05 -06:00
Eric Rahm ab9516d40d Bug 1353593 - Part 2: Remove wwc functions. r=froydnj
This removes the use of |wwc| functions in favor of char16ptr_t's implicit
conversion operators.

MozReview-Commit-ID: GHONYieMPla
2017-06-12 16:20:49 -07: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 230ddb60a5 Bug 1368571: Modify handler and interceptor marshaling code so that it strips out any handlers from proxies that are destined for non-Gecko processes; r=jimm
MozReview-Commit-ID: A1lCqvbQYAF

There is no clean API-based solution to this, so instead I went grovelling
through the DCOM wire protocol and was able to write a function that converts
handler OBJREFs into standard OBJREFs.

See also:
https://msdn.microsoft.com/en-us/library/cc226801

--HG--
extra : rebase_source : a650055c4adda3a1d99262e47f2b463074c6b935
2017-06-06 17:35:51 -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
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
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 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 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 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 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
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